<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_by_symbol(self, symbol: str) -> Commodity: """ Loads currency by symbol """

        assert isinstance(symbol, str)

        query = (
            self.currencies_query
                .filter(Commodity.mnemonic == symbol)
        )
        return query.one()