code: def _clone_estimator(base_estimator, random_state=None):
      estimator = clone(base_estimator)
  
      if random_state is not None:
          set_random_state(estimator, random_state)
  
      return estimator
  
imports: import warnings
  from copy import deepcopy
  from skbase.base import BaseObject
  from sklearn import clone
  from sklearn.base import BaseEstimator
  from sktime.exceptions import NotFittedError
  from sktime.utils.random_state import set_random_state
label_desc: Use image node_id 1 for calling a global function with example usage: _clone_estimator(base_estimator, random_state) and returns: estimator