code: def is_regressor(estimator):
      """Returns True if the given estimator is (probably) a regressor.
      Parameters
      ----------
      estimator : object
          Estimator object to test.
      Returns
      -------
      out : bool
          True if estimator is a regressor and False otherwise.
      """
      return getattr(estimator, "_estimator_type", None) == "regressor"
  
imports: import copy
  import warnings
  from collections import defaultdict
  import numpy
  from scipy import sparse
  from ..None import six
  from ..funcsigs import signature
label_desc: Use image node_id 5 for calling a global function with example usage: is_regressor(estimator) and returns: unknown