code: def accept(self, visitor: "BaseVisitor[ResultT]", *, _parent_board: Optional[chess.Board] = None) -> ResultT:
          
          board = self.parent.board() if _parent_board is None else _parent_board
  
          # First, visit the move that leads to this node.
          self._accept_node(board, visitor)
  
          # Then visit sidelines.
          if _parent_board is not None and self == self.parent.variations[0]:
              for variation in itertools.islice(self.parent.variations, 1, None):
                  if visitor.begin_variation() is not SKIP:
                      variation.accept(visitor, _parent_board=board)
                  visitor.end_variation()
  
          # The mainline is continued last.
          if self.variations:
              board.push(self.move)
              self.variations[0].accept(visitor, _parent_board=board)
              board.pop()
  
          # Get the result if not called recursively.
          return visitor.result() if _parent_board is None else None
docs: Traverses game nodes in PGN order using the given *visitor*. Starts with
          the move leading to this node. Returns the *visitor* result.