code: def connect(self, successor):
          
          if isinstance(self, ConnectToExitNode) and not isinstance(successor, EntryOrExitNode):
              return
  
          self.outgoing.append(successor)
          successor.ingoing.append(self)
docs: Connect this node to its successor node by
          setting its outgoing and the successors ingoing.