code: def test_minimum_spanning_tree_nx(graph_file):
      # cugraph
      G = graph_file.get_graph()
      G.edgelist.edgelist_df["weights"] = G.edgelist.edgelist_df[
          "weights"
      ].astype("float64")
      # Just for getting relevant timing
      G.view_adj_list()
      t1 = time.time()
      cugraph_mst = cugraph.minimum_spanning_tree(G)
      t2 = time.time() - t1
      print("CuGraph time : " + str(t2))
  
      # Nx
      dataset_path = graph_file.get_path()
      df = utils.read_csv_for_nx(dataset_path, read_weights_in_sp=True)
      Gnx = nx.from_pandas_edgelist(
          df,
          create_using=nx.Graph(),
          source="0",
          target="1",
          edge_attr="weight",
      )
      t1 = time.time()
      mst_nx = nx.minimum_spanning_tree(Gnx)
      t2 = time.time() - t1
      print("Nx Time : " + str(t2))
  
      utils.compare_mst(cugraph_mst, mst_nx)
  
file_path: cugraph/python/cugraph/cugraph/tests/tree/test_minimum_spanning_tree.py
imports: import time
  import gc
  import rmm
  import cudf
  import pytest
  import numpy
  import networkx
  import cugraph
  from cugraph.testing import utils
  from cugraph.datasets import netscience
label_desc: Use image node_id 3 for calling a global function with example usage: test_minimum_spanning_tree_nx(graph_file) without return types