def if_delegate_has_method(delegate):
 if isinstance(delegate, list):
  delegate = tuple(delegate)
 if (not isinstance(delegate, tuple)):
  delegate = (delegate,)
 return (lambda fn: _IffHasAttrDescriptor(fn, delegate, attribute_name=fn.__name__))

def if_delegate_has_method ( delegate ) : if isinstance ( delegate , list ) : delegate = tuple ( delegate ) if ( not isinstance ( delegate , tuple ) ) : delegate = ( delegate , ) return ( lambda fn : _IffHasAttrDescriptor ( fn , delegate , attribute_name = fn . __name__ ) )
create a decorator for methods that are delegated to a sub-estimator this enables ducktyping by hasattr returning true according to the sub-estimator .