code: def _meta_estimator_has(attr):
      """Check that meta_estimator has `attr`.
  
      Used together with `available_if`."""
  
      def check(self):
          # raise original `AttributeError` if `attr` does not exist
          getattr(self.meta_estimator, attr)
          return True
  
      return check
  
imports: import numpy
  from sklearn.base import MetaEstimatorMixin, clone
  from sklearn.utils._param_validation import HasMethods
  from sklearn.utils.metaestimators import _BaseComposition, available_if
  from ..base import SurvivalAnalysisMixin
  from ..util import property_available_if
label_desc: Use image node_id 1 for calling a global function with example usage: _meta_estimator_has(attr) and returns: check, True