code: def _get_err_msg(estimator):
      return (
          f"Invalid estimator type: {type(estimator)}. Valid estimator types are: "
          f"{VALID_ESTIMATOR_TYPES}"
      )
  
imports: from inspect import isclass, signature
  import numpy
  import pandas
  from pandas.testing import assert_frame_equal
  from sklearn.utils.validation import check_random_state
  from sktime.alignment.base import BaseAligner
  from sktime.base import BaseEstimator, BaseObject
  from sktime.classification.base import BaseClassifier
  from sktime.classification.early_classification import BaseEarlyClassifier
  from sktime.clustering.base import BaseClusterer
  from sktime.datatypes._panel._check import is_nested_dataframe
  from sktime.dists_kernels import BasePairwiseTransformer, BasePairwiseTransformerPanel
  from sktime.forecasting.base import BaseForecaster
  from sktime.registry import scitype
  from sktime.regression.base import BaseRegressor
  from sktime.tests._config import VALID_ESTIMATOR_TYPES
  from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 1 for calling a global function with example usage: _get_err_msg(estimator) and returns: str, type, str, VALID_ESTIMATOR_TYPES