code: def get_unused_node_id(graph, initial_guess='unknown', _format='{}<%d>'):
      
  
      has_node = graph.has_node  # Namespace shortcut for speed.
  
      n = counter()  # Counter.
      node_id_format = _format.format(initial_guess)  # Node id format.
  
      node_id = initial_guess  # Initial guess.
      while has_node(node_id):  # Check if node id is used.
          node_id = node_id_format % n()  # Guess.
  
      return node_id
docs: Finds an unused node id in `graph`.
  
      :param graph:
          A directed graph.
      :type graph: networkx.classes.digraph.DiGraph
  
      :param initial_guess:
          Initial node id guess.
      :type initial_guess: str, optional
  
      :param _format:
          Format to generate the new node id if the given is already used.
      :type _format: str, optional
  
      :return:
          An unused node id.
      :rtype: str