code: def _get_values(
      series: TimeSeries, stochastic_quantile: Optional[float] = 0.5
  ) -> np.ndarray:
      """
      Returns the numpy values of a time series.
      For stochastic series, return either all sample values with (stochastic_quantile=None) or the quantile sample value
      with (stochastic_quantile {>=0,<=1})
      """
      if series.is_deterministic:
          series_values = series.univariate_values()
      else:  # stochastic
          if stochastic_quantile is None:
              series_values = series.all_values(copy=False)
          else:
              series_values = series.quantile_timeseries(
                  quantile=stochastic_quantile
              ).univariate_values()
      return series_values
  
imports: from functools import wraps
  from inspect import signature
  from typing import Callable, Optional, Sequence, Tuple, Union
  from warnings import warn
  import numpy
  from darts import TimeSeries
  from darts.dataprocessing import dtw
  from darts.logging import get_logger, raise_if_not, raise_log
  from darts.utils import _build_tqdm_iterator, _parallel_apply
  from darts.utils.statistics import check_seasonality
label_desc: Use image node_id 3 for calling a global function with example usage: _get_values(series, stochastic_quantile) and returns: series_values