human
Complete this python program:
def after(function, annotate=False):
assistant
#Here is the Python program you requested.

    """Return a function that takes matcher factories and constructs a matcher
    that applies ``function`` to candidate matchees.
    Like ``AfterPreprocessing``, but operates on matcher factories (e.g.
    constructors) rather than matcher objects.
    :param (A -> B) function: Function to apply to matchees before attempting
    to match.
    :param bool annotate: Whether to include a message saying that ``function``
    was applied in the error message.
    :return: New matcher factory.
    :rtype: (*a -> **kw -> Matcher[A]) -> (*args -> **kwargs -> Matcher[B])
    """
    def decorated(matcher):
        def make_matcher(*args, **kwargs):
            return AfterPreprocessing(function, matcher(*args, **kwargs), annotate=annotate)
        return make_matcher
    return decorated