code: def get_pools(time_span=None, api_code=None):
      
  
      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()}
docs: 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}