<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def by_symbol(symbol, country_code=None):
 """Get list of possible currencies for symbol; filter by country_code Look for all currencies that use the `symbol`. If there are currencies used in the country of `country_code`, return only those; otherwise return all found currencies. Parameters: symbol: unicode Currency symbol. country_code: Optional[unicode] Iso3166 alpha2 country code. Returns: List[Currency]: Currency objects for `symbol`; filter by country_code. """

    res = _data()['symbol'].get(symbol)
    if res:
        tmp_res = []
        for d in res:
            if country_code in d.countries:
                tmp_res += [d]

        if tmp_res:
            return tmp_res
        if country_code is None:
            return res