code: def check_alpha(alpha, name="alpha"):
      """Check that quantile or confidence level value, or list of values, is valid.
  
      Checks:
      alpha must be a float, or list of float, all in the open interval (0, 1).
      values in alpha must be unique.
  
      Parameters
      ----------
      alpha : float, list of float
      name : str, optional, default="alpha"
          the name reference to alpha displayed in the error message
  
      Returns
      -------
      alpha coerced to a list, i.e.: [alpha], if alpha was a float; alpha otherwise
  
      Raises
      ------
      ValueError
          If alpha (float) or any value in alpha (list) is outside the range (0, 1).
          If values in alpha (list) are non-unique.
      """
      # check type
      if isinstance(alpha, list):
          if not all(isinstance(a, float) for a in alpha):
              raise ValueError(
                  "When `alpha` is passed as a list, it must be a list of floats"
              )
  
      elif isinstance(alpha, float):
          alpha = [alpha]  # make iterable
  
      # check range
      for a in alpha:
          if not 0 < a < 1:
              raise ValueError(
                  f"values in {name} must lie in the open interval (0, 1), "
                  f"but found value: {a}."
              )
  
      # check uniqueness
      if len(set(alpha)) < len(alpha):
          raise ValueError(
              f"values in {name} must be unique, but found duplicates"
          )
  
      return alpha
  
file_path: sktime/sktime/utils/validation/forecasting.py
imports: from datetime import timedelta
  from typing import Optional, Union
  import numpy
  import pandas
  from sklearn.base import clone, is_regressor
  from sklearn.ensemble import GradientBoostingRegressor
  from sktime.utils.validation import array_is_datetime64, array_is_int, is_date_offset, is_int, is_timedelta
  from sktime.utils.validation.series import check_equal_time_index, check_series
label_desc: Use image node_id 8 for calling a global function with example usage: check_alpha(alpha, name) and returns: alpha