code: def _check_quantiles(quantiles):
      raise_if_not(
          all([0 < q < 1 for q in quantiles]),
          "All provided quantiles must be between 0 and 1.",
      )
  
      # we require the median to be present and the quantiles to be symmetric around it,
      # for correctness of sampling.
      median_q = 0.5
      raise_if_not(
          median_q in quantiles,
          "median quantile `q=0.5` must be in `quantiles`",
      )
      is_centered = [
          -1e-6 < (median_q - left_q) + (median_q - right_q) < 1e-6
          for left_q, right_q in zip(quantiles, quantiles[::-1])
      ]
      raise_if_not(
          all(is_centered),
          "quantiles lower than `q=0.5` need to share same difference to `0.5` as quantiles "
          "higher than `q=0.5`",
      )
  
imports: from enum import Enum
  from functools import wraps
  from inspect import Parameter, getcallargs, signature
  from typing import Callable, Iterator, List, Optional, Sequence, Tuple, TypeVar, Union
  import pandas
  from joblib import Parallel, delayed
  from tqdm import tqdm
  from tqdm.notebook import tqdm
  from darts import TimeSeries
  from darts.logging import get_logger, raise_if_not, raise_log
  from darts.utils.timeseries_generation import generate_index
label_desc: Use image node_id 5 for calling a global function with example usage: _check_quantiles(quantiles) without return types