code: def test_compose_multigraph():
      G = nx.MultiGraph()
      G.add_edge(1, 2, key=0)
      G.add_edge(1, 2, key=1)
      H = nx.MultiGraph()
      H.add_edge(3, 4, key=0)
      H.add_edge(3, 4, key=1)
      GH = nx.compose(G, H)
      assert set(GH) == set(G) | set(H)
      assert set(GH.edges(keys=True)) == set(G.edges(keys=True)) | set(
          H.edges(keys=True)
      )
      H.add_edge(1, 2, key=2)
      GH = nx.compose(G, H)
      assert set(GH) == set(G) | set(H)
      assert set(GH.edges(keys=True)) == set(G.edges(keys=True)) | set(
          H.edges(keys=True)
      )
  
imports: import os
  import pytest
  import networkx
  from networkx.classes.tests import dispatch_interface
  from networkx.utils import edges_equal
label_desc: Use image node_id 17 for calling a global function with example usage: test_compose_multigraph() without return types