code: def keep_path(self, path):
          
          if len(path.addr_trace) < 2:
              return True
  
          return self.should_take_exit(path.addr_trace[-2], path.addr_trace[-1])
docs: Given a path, returns True if the path should be kept, False if it should be cut.