code: def _zscore(level: float, two_tailed: bool = True) -> float:
      """Calculate a z-score from a confidence level.
  
      Parameters
      ----------
      level : float
          A confidence level, in the open interval (0, 1).
      two_tailed : bool (default=True)
          If True, return the two-tailed z score.
  
      Returns
      -------
      z : float
          The z score.
      """
      alpha = 1 - level
      if two_tailed:
          alpha /= 2
      return -norm.ppf(alpha)
  
imports: import numpy
  import pandas
  from scipy.stats import norm
  from sktime.forecasting.base import BaseForecaster
  from sktime.forecasting.compose import ColumnEnsembleForecaster
  from sktime.forecasting.compose._ensemble import _aggregate
  from sktime.forecasting.compose._pipeline import TransformedTargetForecaster
  from sktime.forecasting.exp_smoothing import ExponentialSmoothing
  from sktime.forecasting.trend import PolynomialTrendForecaster
  from sktime.transformations.series.detrend import Deseasonalizer
  from sktime.transformations.series.theta import ThetaLinesTransformer
  from sktime.utils.slope_and_trend import _fit_trend
  from sktime.utils.validation._dependencies import _check_estimator_deps
  from sktime.utils.validation.forecasting import check_sp
  from sktime.utils.warnings import warn
label_desc: Use image node_id 1 for calling a global function with example usage: _zscore(level, two_tailed) and returns: unknown