code: def _create_using_class(create_using, *, default=nxcg.Graph):
      """Handle ``create_using`` argument and return a Graph type from nx_cugraph."""
      inplace = False
      if create_using is None:
          G = default()
      elif isinstance(create_using, type):
          G = create_using()
      elif not hasattr(create_using, "is_directed") or not hasattr(
          create_using, "is_multigraph"
      ):
          raise TypeError(
              "create_using is not a valid graph type or instance"
          )
      elif not isinstance(create_using, nxcg.Graph):
          raise NotImplementedError(
              f"create_using with object of type {type(create_using)} is not supported "
              "by the cugraph backend; only nx_cugraph.Graph objects are allowed."
          )
      else:
          inplace = True
          G = create_using
          G.clear()
      if not isinstance(G, nxcg.Graph):
          if G.is_multigraph():
              if G.is_directed():
                  graph_class = nxcg.MultiDiGraph
              else:
                  graph_class = nxcg.MultiGraph
          elif G.is_directed():
              graph_class = nxcg.DiGraph
          else:
              graph_class = nxcg.Graph
          if G.__class__ not in {
              nx.Graph,
              nx.DiGraph,
              nx.MultiGraph,
              nx.MultiDiGraph,
          }:
              raise NotImplementedError(
                  f"create_using with type {type(G)} is not supported by the cugraph "
                  "backend; only standard networkx or nx_cugraph Graph objects are "
                  "allowed (but not customized subclasses derived from them)."
              )
      else:
          graph_class = G.__class__
      return graph_class, inplace
  
file_path: cugraph/python/nx-cugraph/nx_cugraph/generators/_utils.py
imports: import operator
  import cupy
  import networkx
  import nx_cugraph
  from ..utils import index_dtype
label_desc: Use image node_id 5 for calling a global function with example usage: _create_using_class(create_using) and returns: graph_class,  inplace