docs: def download_tile(map_layer, zoom, x, y):
      """
      Download a given tile from the tile server.
  
      Args:
          map_layer (MapLayer): MapLayer object which provides the tile-url.
          zoom (int): zoom level
          x (int): Tile-x-coordinate
          y (int): Tile-y-coordinate
  
      Returns:
          file: temporary file containing the downloaded image.
  
      """
      try:
          tile_url = map_layer.get_tile_url(zoom, x, y)
          tmp_file, headers = urllib.request.urlretrieve(tile_url)
          return (x, y), tmp_file
      except URLError as e:
          app.logger.info("Error downloading tile x={}, y={}, z={} for layer {}: {}".format(
              x, y, zoom, map_layer, e.reason))
          return (x, y), pkg_resources.resource_filename("geos", "static/empty_tile.png")