code: def _check_estimators_type(
      objs: Union[dict, list, BaseEstimator]
  ) -> None:
      """Check if all estimators are initialised BaseEstimator objects.
  
      Raises
      ------
      TypeError
          If any of the estimators are not BaseEstimator objects.
      """
      if isinstance(objs, BaseEstimator):
          objs = [objs]
      items = objs.values() if isinstance(objs, dict) else objs
      compatible = all(
          is_initalised_estimator(estimator) for estimator in items
      )
      if not compatible:
          raise TypeError(
              "One or many estimator(s) is not an initialised BaseEstimator "
              "object(s). Please instantiate the estimator(s) first."
          )
  
file_path: sktime/sktime/benchmarking/benchmarks.py
imports: from typing import Callable, Optional, Union
  import pandas
  from sktime.base import BaseEstimator
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 2 for calling a global function with example usage: _check_estimators_type(objs) without return types