code: def tile_read(source, bounds, tilesize, **kwargs):
      
      if isinstance(source, DatasetReader):
          return _tile_read(source, bounds, tilesize, **kwargs)
      else:
          with rasterio.open(source) as src_dst:
              return _tile_read(src_dst, bounds, tilesize, **kwargs)
docs: Read data and mask.
  
      Attributes
      ----------
      source : str or rasterio.io.DatasetReader
          input file path or rasterio.io.DatasetReader object
      bounds : list
          Mercator tile bounds (left, bottom, right, top)
      tilesize : int
          Output image size
      kwargs: dict, optional
          These will be passed to the _tile_read function.
  
      Returns
      -------
      out : array, int
          returns pixel value.