class_docstr: Implements the quantile function in Forecast for TreePredictor, as well as
  a new estimate_dists function for estimating a sampling of the conditional
  distribution of the value of each of the steps in the forecast horizon
  (independently).
docstr: Returns np.array, where the i^th entry is the estimate of the q
  quantile of the conditional distribution of the value of the i^th step
  in the forecast horizon.
docstr_tok: ["Returns","np.array",",","where","the","i^th","entry","is","the","estimate","of","the","q","quantile","of","the","conditional","distribution","of","the","value","of","the","i^th","step","in","the","forecast","horizon","."]
code: def quantile(self, q: float) -> np.ndarray:  # type: ignore
      """
      Returns np.array, where the i^th entry is the estimate of the q
      quantile of the conditional distribution of the value of the i^th step
      in the forecast horizon.
      """
      assert 0 <= q <= 1
      return np.array(
          list(
              chain.from_iterable(
                  model.predict(self.featurized_data, q)
                  for model in self.models
              )
          )
      )
  
imports: import concurrent.futures
  import logging
  import pickle
  from itertools import chain
  from typing import Iterator, List, Optional, Any, Dict
  from toolz import first
  import numpy
  import pandas
  from pathlib import Path
  from itertools import compress
  from gluonts.core.component import validated
  from gluonts.dataset.common import Dataset
  from gluonts.dataset.util import forecast_start
  from gluonts.model.forecast import Forecast
  from gluonts.model.forecast_generator import log_once
  from gluonts.model.predictor import RepresentablePredictor
  from ._model import QRF, QRX, QuantileReg
  from ._preprocess import Cardinality, PreprocessOnlyLagFeatures
  from ._types import FeatureImportanceResult, ExplanationResult
label_desc: Use image node_id 2 for calling the RotbaumForecast obj's underlying member method code with example usage: obj.quantile(q) and returns: np