human
I wrote the below code

    Assert(hasattr(sys, 'settrace'))
    global traces
    traces = []
    def f(frame, kind, info):
        traces.append(('f', kind, frame.f_code.co_name))
        return g
    def g(frame, kind, info):
        traces.append(('g', kind, frame.f_code.co_name))
        return g_ret
    g_ret = g
    def x():
        abc = 'hello'
        abc = 'next'
    sys.settrace(f)
    x()
    sys.settrace(None)
    AreEqual(traces, [('f', 'call', 'x'), ('g', 'line', 'x'), ('g', 'line', 'x'), ('g', 'return', 'x')])
    traces = []
    g_ret = f
    sys.settrace(f)
    x()
    sys.settrace(None)
    AreEqual(traces, [('f', 'call', 'x'), ('g', 'line', 'x'), ('f', 'line', 'x'), ('g', 'return', 'x')])
    global frameobj
    def f(frame, event, payload):
        global frameobj
        frameobj = frame
    def g(a):
        b = 42
    sys.settrace(f)
    g(32)
    sys.settrace(None)
    AreEqual(frameobj.f_locals, {'a': 32, 'b': 42})
    Assert(('test_getrefcount' in frameobj.f_globals))
    if is_cli:
        import os
        content = 'a    =    "aaa"\nimport    pdb.
   pdb.set_trace()\nb    =    "bbb"\nc    =    "ccc"\nfinal    =    a    +    b    +    c\nprint    final'
        f = file('temp.py', 'w+')
        try:
            f.write(content)
            f.close()
            (stdin, stdout) = os.popen2((sys.executable + '    -X:Tracing    -X:Frames    temp.py'))
            stdin.write('n\nn\nn\nn\nn\nn\nn\nn\n')
            stdin.flush()
            out = [x for x in stdout]
            Assert(('->    b    =    "bbb"\n' in out))
            Assert(('->    c    =    "ccc"\n' in out))
            Assert(('->    final    =    a    +    b    +    c\n' in out))
            Assert(('->    print    final\n' in out))
            Assert(('(Pdb)    aaabbbccc\n' in out))
            Assert(('--Return--\n' in out))
            Assert(('->    print    final\n' in out))
            Assert(('(Pdb)    ' in out))
        finally:
            os.unlink('temp.py')

What's a good function header?
 ... Can you provide a Python program to print    final'?
assistant
#Here is Python program to print    final'
.

@skip('netstandard')
@skip('silverlight')
def test_settrace():