@classmethod<EOL><INDENT>def from_symbol(cls, symbol):<DEDENT>
if symbol.lower() == symbol:<EOL><INDENT>return cls(PIECE_SYMBOLS.index(symbol), WHITE)<EOL><DEDENT>else:<EOL><INDENT>return cls(PIECE_SYMBOLS.index(symbol.lower()), BLACK)<EOL><DEDENT>
Creates a piece instance from a piece symbol.
Raises `ValueError` if the symbol is invalid.