human
Solve the following python programming problem given the following code:
def test_frame_stack() : 
    def to_code_names(frames) : 
        code_names = deque () 
        for frame in reversed (frames) : 
            code_name = frame.f_code.co_name 
            if (code_name not in mock_code_names) : 
                break 
code_names.appendleft (code_name) 
return list (code_names) 
baz_frame = foo () 
    foo_frame = baz_frame.f_back.f_back 
    frames = frame_stack (baz_frame) 
    assert (to_code_names (frames) == ['foo', 'bar', 'baz']) 
    frames = frame_stack (baz_frame, base_frame = foo_frame) 
    assert (to_code_names (frames) == ['bar', 'baz']) 
    frames = frame_stack (baz_frame, ignored_codes = [six.get_function_code (foo), six.get_function_code (baz)]) 
    assert (to_code_names (to_code_names) == ['bar']) 

    
    

    Fix the buggy line: assert (to_code_names (to_code_names) == ['bar'])
assistant
#Here is Python program to fix the buggy line: assert (to_code_names (to_code_names) == ['bar'])
.

assert (to_code_names (frames) == ['bar'])