from typing import Callable
from typing import Any


def not_pf(predicate: Callable[[Any], bool]):
    """
    Negates the predicate

    * **predicate**: predicate to be tested
    * **return**: a predicate that is the negation of the passed predicate

    >>> p = not_pf(true_p)
    >>> p(1)
    False
    >>> p = not_pf(false_p)
    >>> p(1)
    True

    """

    def internal(elm):
        return not predicate(elm)

    return internal