code: def test_multigraph(graph_file):
      # FIXME: Migrate to new test fixtures for Graph setup once available
      G = graph_file.get_graph(
          create_using=cugraph.MultiGraph(directed=True)
      )
      dataset_path = graph_file.get_path()
      nxM = utils.read_csv_for_nx(dataset_path, read_weights_in_sp=True)
      Gnx = nx.from_pandas_edgelist(
          nxM,
          source="0",
          target="1",
          edge_attr="weight",
          create_using=nx.MultiDiGraph(),
      )
  
      assert G.number_of_edges() == Gnx.number_of_edges()
      assert G.number_of_nodes() == Gnx.number_of_nodes()
      cuedges = cugraph.to_pandas_edgelist(G)
      cuedges.rename(
          columns={"src": "source", "dst": "target", "wgt": "weight"},
          inplace=True,
      )
      cuedges["weight"] = cuedges["weight"].round(decimals=3)
      nxedges = nx.to_pandas_edgelist(Gnx).astype(
          dtype={
              "source": "int32",
              "target": "int32",
              "weight": "float32",
          }
      )
      cuedges = cuedges.sort_values(
          by=["source", "target"]
      ).reset_index(drop=True)
      nxedges = nxedges.sort_values(
          by=["source", "target"]
      ).reset_index(drop=True)
      nxedges["weight"] = nxedges["weight"].round(decimals=3)
      assert nxedges.equals(cuedges[["source", "target", "weight"]])
  
file_path: cugraph/python/cugraph/cugraph/tests/structure/test_multigraph.py
imports: import gc
  import pytest
  import numpy
  import networkx
  import cugraph
  from cugraph.testing import utils, DEFAULT_DATASETS
label_desc: Use image node_id 2 for calling a global function with example usage: test_multigraph(graph_file) without return types