<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_token(wallet: 'Wallet', token_str: str) -> 'NEP5Token.NEP5Token': """ Try to get a NEP-5 token based on the symbol or script_hash Args: wallet: wallet instance token_str: symbol or script_hash (accepts script hash with or without 0x prefix) Raises: ValueError: if token is not found Returns: NEP5Token instance if found. """

    if token_str.startswith('0x'):
        token_str = token_str[2:]

    token = None
    for t in wallet.GetTokens().values():
        if token_str in [t.symbol, t.ScriptHash.ToString()]:
            token = t
            break

    if not isinstance(token, NEP5Token.NEP5Token):
        raise ValueError("The given token argument does not represent a known NEP5 token")
    return token