def _apply_if_callable(maybe_callable, obj, **kwargs):
 if callable(maybe_callable):
  return maybe_callable(obj, **kwargs)
 return maybe_callable

def _apply_if_callable ( maybe_callable , obj , ** kwargs ) : if callable ( maybe_callable ) : return maybe_callable ( obj , ** kwargs ) return maybe_callable
evaluate possibly callable input using obj and kwargs if it is callable .