human
Solve the following python programming problem given the following code:
@ contextmanager 
def mock_context(mock, typ = Mock) : 
    context = mock.return_value = Mock () 
    context.__enter__ = typ () 
    context.__exit__ = typ () 
    def on_exit(* x) : 
        if x [0] : 
            reraise (x [0], x [1], x [2]) 
context.__exit__.side_effect = mock 
    context.__enter__.return_value = context 
    (yield context) 
    context.reset () 

    
    

    Fix the buggy line: context.__exit__.side_effect = mock
assistant
#Here is Python code to fix the buggy line: context.

context.__exit__.side_effect = def on_exit(