How could two graphs get optimized jointly

Hi, I get two graphs and a loss function which calculated on embeddings from two graphs. But, I am struggling with the implementations. Could you guys provide some insides or code for references? Thanks so much!

Does this tutorial help?