<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_pools(time_span=None, api_code=None):
 """Get number of blocks mined by each pool. :param str time_span: duration of the chart. Default is 4days (optional) :param str api_code: Blockchain.info API code (optional) :return: an instance of dict:{str,int} """


    resource = 'pools'
    if time_span is not None:
        resource += '?timespan=' + time_span
    if api_code is not None:
        resource += '&api_code=' + api_code
    response = util.call_api(resource, base_url='https://api.blockchain.info/')
    json_response = json.loads(response)
    return {k: v for (k, v) in json_response.items()}