def validate_is_callable_or_none(option, value):
    """Validates that 'value' is a callable."""
    if value is None:
        return value
    if not callable(value):
        raise ValueError("%s must be a callable" % (option,))
    return value
def validate_is_callable_or_none ( option , value ) : if value is None : return value if not callable ( value ) : raise ValueError ( "%s must be a callable" % ( option , ) ) return value
Validates that 'value' is a callable.