code: def is_estimator(model):
      """
      Determines if a model is an estimator using issubclass and isinstance.
  
      Parameters
      ----------
      estimator : class or instance
          The object to test if it is a Scikit-Learn clusterer, especially a
          Scikit-Learn estimator or Yellowbrick visualizer
      """
      if inspect.isclass(model):
          return issubclass(model, (BaseEstimator, ContribEstimator))
  
      return isinstance(model, (BaseEstimator, ContribEstimator))
  
file_path: yellowbrick/yellowbrick/utils/types.py
imports: import inspect
  import numpy
  from sklearn.base import BaseEstimator
  from yellowbrick.contrib.wrapper import ContribEstimator
label_desc: Use image node_id 1 for calling a global function with example usage: is_estimator(model) and returns: isinstance, issubclass