code: def test_add_edge_or_adj_list_after_add_edge_or_adj_list(graph_file):
      Mnx = utils.read_csv_for_nx(graph_file)
      df = cudf.DataFrame()
      df["src"] = cudf.Series(Mnx["0"])
      df["dst"] = cudf.Series(Mnx["1"])
  
      N = max(max(Mnx["0"]), max(Mnx["1"])) + 1
      Mcsr = scipy.sparse.csr_matrix(
          (Mnx.weight, (Mnx["0"], Mnx["1"])), shape=(N, N)
      )
  
      offsets = cudf.Series(Mcsr.indptr)
      indices = cudf.Series(Mcsr.indices)
  
      G = cugraph.Graph(directed=True)
  
      # If cugraph has at least one graph representation, adding a new graph
      # should fail to prevent a single graph object storing two different
      # graphs.
  
      # If cugraph has a graph edge list, adding a new graph should fail.
      G.from_cudf_edgelist(df, source="src", destination="dst")
      with pytest.raises(Exception):
          G.from_cudf_edgelist(df, source="src", destination="dst")
      with pytest.raises(Exception):
          G.from_cudf_adjlist(offsets, indices, None)
      G.delete_edge_list()
  
      # If cugraph has a graph adjacency list, adding a new graph should fail.
      G.from_cudf_adjlist(offsets, indices, None)
      with pytest.raises(Exception):
          G.from_cudf_edgelist(df, source="src", destination="dst")
      with pytest.raises(Exception):
          G.from_cudf_adjlist(offsets, indices, None)
      G.delete_adj_list()
  
imports: import gc
  import time
  import pytest
  import pandas
  import scipy
  import networkx
  import cupy
  import cudf
  import cugraph
  from cugraph.testing import utils
  from cudf.testing import assert_series_equal
  from cudf.testing.testing import assert_frame_equal
  import dask_cudf
  import cugraph.dask
  from dask.distributed import Client
  from dask_cuda import LocalCUDACluster
  from pylibcugraph import ResourceHandle
  from pylibcugraph import bfs
  from cugraph.dask.traversal.bfs import convert_to_cudf
  from cugraph.dask.common.mg_utils import is_single_gpu
label_desc: Use image node_id 12 for calling a global function with example usage: test_add_edge_or_adj_list_after_add_edge_or_adj_list(graph_file) without return types