code: def has_intercept(estimator):
      # type: (Any) -> bool
      """Return True if an estimator has intercept fit."""
      if hasattr(estimator, "fit_intercept"):
          return estimator.fit_intercept
      if hasattr(estimator, "intercept_"):
          if estimator.intercept_ is None:
              return False
          # scikit-learn sets intercept to zero vector if it is not fit
          return np.any(estimator.intercept_)
      return False
  
imports: from __future__ import absolute_import
  from distutils.version import LooseVersion
  from typing import Any, Optional, List, Tuple
  import numpy
  import scipy.sparse
  from sklearn.multiclass import OneVsRestClassifier
  from eli5.sklearn.unhashing import invert_hashing_and_fit, handle_hashing_vec
  from eli5._feature_names import FeatureNames
label_desc: Use image node_id 5 for calling a global function with example usage: has_intercept(estimator) and returns: False, estimator, np, False