code: def from_symbol(cls, symbol: str) -> "Piece":
          
          return cls(PIECE_SYMBOLS.index(symbol.lower()), symbol.isupper())
docs: Creates a :class:`~chess.Piece` instance from a piece symbol.
  
          :raises: :exc:`ValueError` if the symbol is invalid.