def capture(real_pass):
    """ Returns a compiler pass that captures the mutation state reported
    by the pass used in the argument"""
    @register_pass(mutates_CFG=False, analysis_only=True)
    class ResultCapturer(AnalysisPass):
        _name = "capture_%s" % real_pass._name
        _real_pass = real_pass

        def __init__(self):
            FunctionPass.__init__(self)

        def run_pass(self, state):
            result = real_pass().run_pass(state)
            mutation_results = state.metadata.setdefault('mutation_results', {})
            mutation_results[real_pass] = result
            return result

    return ResultCapturer
 Returns a compiler pass that captures the mutation state reported
    by the pass used in the argument
numba/tests/test_mixed_tuple_unroller.py