code: def _check_is_fitted(estimator, attributes=None):
      from sklearn import __version__
  
      if __version__ < "0.22":
          return check_is_fitted(estimator, attributes)
      else:
          return check_is_fitted(estimator)
  
imports: import numbers
  import numpy
  from itertools import compress
  from scipy.sparse import issparse
  from sklearn.model_selection import ParameterGrid
  from sklearn.utils.validation import check_is_fitted
label_desc: Use image node_id 2 for calling a global function with example usage: _check_is_fitted(estimator, attributes) and returns: check_is_fitted, check_is_fitted