code: def is_sampler(estimator):
      """Return True if the given estimator is a sampler, False otherwise.
  
      Parameters
      ----------
      estimator : object
          Estimator to test.
  
      Returns
      -------
      is_sampler : bool
          True if estimator is a sampler, otherwise False.
      """
      if estimator._estimator_type == "sampler":
          return True
      return False
  
imports: from abc import ABCMeta, abstractmethod
  from typing import List, Optional
  import numpy
  from sklearn.base import BaseEstimator
  from sklearn.preprocessing import label_binarize
  from sklearn.utils.multiclass import check_classification_targets
  from .utils import check_sampling_strategy, check_target_type
  from .utils import ArraysTransformer
label_desc: Use image node_id 1 for calling a global function with example usage: is_sampler(estimator) and returns: False, True