docs: def graph_from_alphabet(alphabet, base):
      """Creates a graph that connects the base with the target through alphabets
      If every target is connected to any inputs, create the independent paths"""
      if not isinstance(alphabet, Choice):
          raise TypeError(alphabet.__class__.__name__)
      if not isinstance(base, Choice):
          raise TypeError(base.__class__.__name__)
              
      import networkx
      result = networkx.DiGraph()
      current_alphabet = alphabet
      pending_stack = set(current_alphabet)
      while pending_stack:
          current_alphabet = pending_stack.pop()
          if current_alphabet == base:
              continue
          if current_alphabet in base:
              result.add_edge(current_alphabet, base)
          elif isinstance(current_alphabet, Choice):
              for element in current_alphabet:
                  if element in base:
                      result.add_edge(current_alphabet, base)
                  else:
                      result.add_edge(current_alphabet, element)
                      pending_stack.add(element)
          elif current_alphabet.alphabet:
              result.add_edge(current_alphabet, current_alphabet.alphabet)
              pending_stack.add(current_alphabet.alphabet)
      return result