def METHOD_NAME(self):
    def f(i):
        return i * 2
    def g():
        pass
    # outside of a traceback
    self.assertEqual(10, sys.call_tracing(f, (5, )))
    # inside of a traceback
    log = []
    def thandler(frm, evt, pl):
        if evt == 'call':
            log.append(frm.f_code.co_name)
            if log[-1] == 'g':
                sys.call_tracing(f, (5, ))
        return thandler
    sys.settrace(thandler)
    g()
    sys.settrace(None)
    self.assertEqual(log, ['g', 'f'])