code: def _common_small_graph(
      n, nodes, create_using, *, allow_directed=True
  ):
      """Create a "common graph" for small n.
  
      n == 0: empty graph
      n == 1: empty graph
      n == 2: complete graph
      n > 2: undefined
      """
      graph_class, inplace = _create_using_class(create_using)
      if not allow_directed and graph_class.is_directed():
          raise nx.NetworkXError("Directed Graph not supported")
      if n < 2:
          G = graph_class.from_coo(
              n,
              cp.empty(0, index_dtype),
              cp.empty(0, index_dtype),
              id_to_key=nodes,
          )
      else:
          G = graph_class.from_coo(
              n,
              cp.arange(2, dtype=index_dtype),
              cp.array([1, 0], index_dtype),
              id_to_key=nodes,
          )
      if inplace:
          return create_using._become(G)
      return G
  
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 4 for calling a global function with example usage: _common_small_graph(n, nodes, create_using) and returns: G, create_using