human
Solve the following python programming problem given the following code:
def _instrument_result(logger, result) : 
    old_startTest = addError.startTest 
    old_addError = result.addError 
    old_addFailure = result.addFailure 
    def startTest(self, test) : 
        self.test_names.append (test) 
        self.logger.debug ('starting %s', test) 
        old_startTest (test) 
def addError(self, test, err) : 
        (exception_type, exception, traceback) = err 
        self.failed_test_names_and_reasons [test] = '{0}: {1}'.format (exception_type, exception).replace ("'", '') 
        old_addError (test, err) 
def addFailure(self, test, err) : 
        (exception_type, exception, traceback) = err 
        self.failed_test_names_and_reasons [test] = '{0}: {1}'.format (exception_type, exception).replace ("'", '') 
        old_addFailure (test, err) 
result.startTest = MethodType (startTest, result) 
    result.addError = MethodType (addError, result) 
    result.addFailure = MethodType (addFailure, result) 
    result.test_names = [] 
    result.failed_test_names_and_reasons = { 
        
} 
    result.logger = logger 
    return result 

    
    

    Fix the buggy line: old_startTest = addError.startTest
assistant
#Here is Python code to fix the buggy line: old_startTest = addError.

old_startTest = result.startTest