docs: def connect(self, whom, direction="to"):
          """Create a vector from self to/from whom.
  
          Return a list of newly created vector between the node and whom.
          ``whom`` can be a specific node or a (nested) list of nodes. Nodes can
          only connect with nodes in the same network. In addition nodes cannot
          connect with themselves or with Sources. ``direction`` specifies the
          direction of the connection it can be "to" (node -> whom), "from" (whom
          -> node) or both (node <-> whom). The default is "to".
  
          Whom may be a (nested) list of nodes.
  
          Will raise an error if:
              1. whom is not a node or list of nodes
              2. whom is/contains a source if direction is to or both
              3. whom is/contains self
              4. whom is/contains a node in a different network
  
          If self is already connected to/from whom a Warning
          is raised and nothing happens.
  
          This method returns a list of the vectors created
          (even if there is only one).
  
          """
          # check direction
          if direction not in ["to", "from", "both"]:
              raise ValueError(
                  "{} is not a valid direction for connect()".format(direction)
              )
  
          # make whom a list
          whom = self.flatten([whom])
  
          # make the connections
          new_vectors = []
          if direction in ["to", "both"]:
              already_connected_to = self.flatten(
                  [self.is_connected(direction="to", whom=whom)]
              )
              for node, connected in zip(whom, already_connected_to):
                  if connected:
                      print(
                          "Warning! {} already connected to {}, "
                          "instruction to connect will be ignored.".format(self, node)
                      )
                  else:
                      new_vectors.append(Vector(origin=self, destination=node))
          if direction in ["from", "both"]:
              already_connected_from = self.flatten(
                  [self.is_connected(direction="from", whom=whom)]
              )
              for node, connected in zip(whom, already_connected_from):
                  if connected:
                      print(
                          "Warning! {} already connected from {}, "
                          "instruction to connect will be ignored.".format(self, node)
                      )
                  else:
                      new_vectors.append(Vector(origin=node, destination=self))
          return new_vectors