code: def download_array(shakemap_id, shakemap_url=SHAKEMAP_URL):
      
      url = shakemap_url.format(shakemap_id)
      logging.info('Downloading %s', url)
      contents = json.loads(urlopen(url).read())[
          'properties']['products']['shakemap'][-1]['contents']
      grid = contents.get('download/grid.xml')
      if grid is None:
          raise MissingLink('Could not find grid.xml link in %s' % url)
      uncertainty = contents.get('download/uncertainty.xml.zip')
      if uncertainty is None:
          with urlopen(grid['url']) as f:
              return get_shakemap_array(f)
      else:
          with urlopen(grid['url']) as f1, urlextract(
                  uncertainty['url'], 'uncertainty.xml') as f2:
              return get_shakemap_array(f1, f2)
docs: :param shakemap_id: USGS Shakemap ID
      :returns: an array with the shakemap