def can_complain(func):
    """Marks `func` (in-place) as capable of reporting notices.

    If so marked, `func` will be called
    with a special `complain` function as the first argument,
    which must be called to report a notice.
    """
    func.with_complaints = True
    return func
