class_docstr: Implements a conditional property using the descriptor protocol.
  
  Using this class to create a decorator will raise an ``AttributeError``
  if none of the delegates (specified in ``delegate_names``) is an attribute
  of the base object or the first found delegate does not have an attribute
  ``attribute_name``.
  
  This allows ducktyping of the decorated method based on
  ``delegate.attribute_name``. Here ``delegate`` is the first item in
  ``delegate_names`` for which ``hasattr(object, delegate) is True``.
  
  See https://docs.python.org/3/howto/descriptor.html for an explanation of
  descriptors.
code: def __init__(self, fn, delegate_names, attribute_name):
      self.fn = fn
      self.delegate_names = delegate_names
      self.attribute_name = attribute_name
  
      # update the docstring of the descriptor
      update_wrapper(self, fn)
  
file_path: catboost/contrib/python/scikit-learn/py2/sklearn/utils/metaestimators.py
imports: from operator import attrgetter
  from functools import update_wrapper
  import numpy
  from ..utils import safe_indexing
label_desc: Use image node_id 1 to create a new _IffHasAttrDescriptor object from inherited base classes: object with example: obj = _IffHasAttrDescriptor(fn, delegate_names, attribute_name)