def get_pools(time_span=None, api_code=None):
resource = '<STR_LIT>'<EOL>if time_span is not None:<EOL><INDENT>resource += '<STR_LIT>' + time_span<EOL><DEDENT>if api_code is not None:<EOL><INDENT>resource += '<STR_LIT>' + api_code<EOL><DEDENT>response = util.call_api(resource, base_url='<STR_LIT>')<EOL>json_response = json.loads(response)<EOL>return {k: v for (k, v) in json_response.items()}<EOL>
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}