def callable_validator(instance, attribute, value):
    """Validate that an attribute value is callable.

    :raises TypeError: if ``value`` is not callable
    """
    if not callable(value):
        raise TypeError('"{name}" value "{value}" must be callable'.format(
            name=attribute.name, value=value))
