code: def metadata(sceneid, pmin=2, pmax=98, **kwargs):
      
      scene_params = _sentinel_parse_scene_id(sceneid)
      sentinel_address = "{}/{}".format(SENTINEL_BUCKET, scene_params["key"])
  
      dst_crs = CRS({"init": "EPSG:4326"})
      with rasterio.open("{}/preview.jp2".format(sentinel_address)) as src:
          bounds = transform_bounds(
              *[src.crs, dst_crs] + list(src.bounds), densify_pts=21
          )
  
      info = {"sceneid": sceneid}
      info["bounds"] = {"value": bounds, "crs": dst_crs.to_string()}
  
      addresses = [
          "{}/preview/B{}.jp2".format(sentinel_address, band) for band in SENTINEL_BANDS
      ]
  
      _stats_worker = partial(_sentinel_stats, percentiles=(pmin, pmax), **kwargs)
      with futures.ThreadPoolExecutor(max_workers=MAX_THREADS) as executor:
          responses = executor.map(_stats_worker, addresses)
      info["statistics"] = {
          b: v for b, d in zip(SENTINEL_BANDS, responses) for k, v in d.items()
      }
      return info
docs: Retrieve image bounds and band statistics.
  
      Attributes
      ----------
      sceneid : str
          Sentinel-2 sceneid.
      pmin : int, optional, (default: 2)
          Histogram minimum cut.
      pmax : int, optional, (default: 98)
          Histogram maximum cut.
      kwargs : optional
          These are passed to 'rio_tiler.sentinel2._sentinel_stats'
          e.g: histogram_bins=20'
  
      Returns
      -------
      out : dict
          Dictionary with image bounds and bands statistics.