code: def get_blocks(time=None, pool_name=None, api_code=None):
      
  
      resource = 'blocks/{0}?format=json'
      if api_code is not None:
          resource += '&api_code=' + api_code
      if time is not None:
          resource = resource.format(time)
      elif pool_name is not None:
          resource = resource.format(pool_name)
      else:
          resource = resource.format('')
  
      response = util.call_api(resource)
      json_response = json.loads(response)
      return [SimpleBlock(b) for b in json_response['blocks']]
docs: Get a list of blocks for a specific day or mining pool.
      Both parameters are optional but at least one is required.
  
      :param int time: time in milliseconds
      :param str pool_name: name of the mining pool
      :param str api_code: Blockchain.info API code (optional)
      :return: an array of :class:`SimpleBlock` objects