def METHOD_NAME(observations):
    # make `observation` the target to report to.
    # it is basically a dictionary that stores temporary observations
    global OBSERVATIONS
    old = OBSERVATIONS
    OBSERVATIONS = observations
    try:
        yield
    finally:
        OBSERVATIONS = old