def METHOD_NAME(self):
    def record_line():
        f = sys._getframe(1)
        lines.append(f.f_lineno-f.f_code.co_firstlineno)
    def test(trace):
        record_line()
        if trace:
            sys._getframe(0).f_trace = True
        record_line()
        record_line()
    expected_lines = [1, 4, 5]
    lines = []
    test(False)
    self.assertEqual(lines, expected_lines)
    lines = []
    test(True)
    self.assertEqual(lines, expected_lines)