code: def _bench_helper(gpubenchmark, N, attr_kind, create_using, method):
      G = method(N, create_using=create_using)
      if attr_kind:
          skip = True
          for *_ids, edgedict in G.edges(data=True):
              skip = not skip
              if skip and attr_kind not in {
                  "full",
                  "required",
                  "required_dtype",
              }:
                  continue
              edgedict["x"] = random.randint(0, 100000)
          if attr_kind == "preserve":
              gpubenchmark(
                  nxcg.from_networkx, G, preserve_edge_attrs=True
              )
          elif attr_kind == "half_missing":
              gpubenchmark(
                  nxcg.from_networkx, G, edge_attrs={"x": None}
              )
          elif attr_kind == "required":
              gpubenchmark(nxcg.from_networkx, G, edge_attrs={"x": ...})
          elif attr_kind == "required_dtype":
              gpubenchmark(
                  nxcg.from_networkx,
                  G,
                  edge_attrs={"x": ...},
                  edge_dtypes={"x": np.int32},
              )
          else:  # full, half_default
              gpubenchmark(nxcg.from_networkx, G, edge_attrs={"x": 0})
      else:
          gpubenchmark(nxcg.from_networkx, G)
  
file_path: cugraph/python/nx-cugraph/nx_cugraph/tests/bench_convert.py
imports: import random
  import networkx
  import numpy
  import pytest
  import nx_cugraph
label_desc: Use image node_id 1 for calling a global function with example usage: _bench_helper(gpubenchmark, N, attr_kind, create_using, method) without return types