code: def _check_theta(theta):
      valid_theta_types = (list, int, float, tuple)
  
      if not isinstance(theta, valid_theta_types):
          raise ValueError(
              f"invalid input, please use one of {valid_theta_types}"
          )
  
      if isinstance(theta, (int, float)):
          theta = [theta]
  
      if isinstance(theta, tuple):
          theta = list(theta)
  
      return theta
  
file_path: sktime/sktime/transformations/series/theta.py
imports: import numpy
  import pandas
  from sktime.forecasting.base import ForecastingHorizon
  from sktime.forecasting.trend import PolynomialTrendForecaster
  from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 2 for calling a global function with example usage: _check_theta(theta) and returns: theta