code: def read_csv(request):
      """
      Read csv file for both networkx and cugraph
      """
      graph_file = request.param
      dataset_path = graph_file.get_path()
      Mnx = utils.read_csv_for_nx(dataset_path)
  
      N = max(max(Mnx[SRC_COL]), max(Mnx[DST_COL])) + 1
      M = scipy.sparse.csr_matrix(
          (Mnx.weight, (Mnx[SRC_COL], Mnx[DST_COL])), shape=(N, N)
      )
  
      return M, graph_file
  
imports: import gc
  import pytest
  import numpy
  import scipy
  import cudf
  import cugraph
  from cugraph.testing import utils, UNDIRECTED_DATASETS
  from cudf.testing import assert_series_equal
  from cudf.testing.testing import assert_frame_equal
label_desc: Use image node_id 8 for calling a global function with example usage: read_csv(request) and returns: M,  graph_file