code: def gnc_graph(n, create_using=None, seed=None):
      """Returns the growing network with copying (GNC) digraph with `n` nodes.
  
      The GNC graph is built by adding nodes one at a time with a link to one
      previously added node (chosen uniformly at random) and to all of that
      node's successors.
  
      Parameters
      ----------
      n : int
          The number of nodes for the generated graph.
      create_using : NetworkX graph constructor, optional (default DiGraph)
          Graph type to create. If graph instance, then cleared before populated.
      seed : integer, random_state, or None (default)
          Indicator of random number generation state.
          See :ref:`Randomness<randomness>`.
  
      References
      ----------
      .. [1] P. L. Krapivsky and S. Redner,
             Network Growth by Copying,
             Phys. Rev. E, 71, 036118, 2005k.},
      """
      G = empty_graph(1, create_using, default=nx.DiGraph)
      if not G.is_directed():
          raise nx.NetworkXError(
              "create_using must indicate a Directed Graph"
          )
  
      if n == 1:
          return G
  
      for source in range(1, n):
          target = seed.randrange(0, source)
          for succ in G.successors(target):
              G.add_edge(source, succ)
          G.add_edge(source, target)
      return G
  
file_path: networkx/networkx/generators/directed.py
imports: import numbers
  from collections import Counter
  import networkx
  from networkx.generators.classic import empty_graph
  from networkx.utils import discrete_sequence, py_random_state, weighted_choice
label_desc: Use image node_id 3 for calling a global function with example usage: gnc_graph(n, create_using, seed) and returns: G, G