code: def _check_estimator_types(estimator_types):
      """Return list of classes corresponding to type strings."""
      estimator_types = deepcopy(estimator_types)
  
      if not isinstance(estimator_types, list):
          estimator_types = [estimator_types]  # make iterable
  
      def _get_err_msg(estimator_type):
          return (
              f"Parameter `estimator_type` must be None, a string or a list of "
              f"strings. Valid string values are: "
              f"{tuple(BASE_CLASS_LOOKUP.keys())}, but found: "
              f"{repr(estimator_type)}"
          )
  
      for i, estimator_type in enumerate(estimator_types):
          if not isinstance(estimator_type, (type, str)):
              raise ValueError(
                  "Please specify `estimator_types` as a list of str or "
                  "types."
              )
          if isinstance(estimator_type, str):
              if estimator_type not in BASE_CLASS_LOOKUP.keys():
                  raise ValueError(_get_err_msg(estimator_type))
              estimator_type = BASE_CLASS_LOOKUP[estimator_type]
              estimator_types[i] = estimator_type
          elif isinstance(estimator_type, type):
              pass
          else:
              raise ValueError(_get_err_msg(estimator_type))
      return estimator_types
  
file_path: sktime/sktime/registry/_lookup.py
imports: from copy import deepcopy
  from operator import itemgetter
  from pathlib import Path
  import pandas
  from skbase.lookup import all_objects
  from sktime.base import BaseEstimator
  from sktime.registry._base_classes import BASE_CLASS_LIST, BASE_CLASS_LOOKUP, TRANSFORMER_MIXIN_LIST
  from sktime.registry._tags import ESTIMATOR_TAG_REGISTER
label_desc: Use image node_id 6 for calling a global function with example usage: _check_estimator_types(estimator_types) and returns: estimator_types, str, tuple, str, repr