<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _failed(self, msg):
 """ Log a validation failure. :param string msg: the error message """

        self.log(msg)
        self.result.passed = False
        self.result.add_error(msg)
        self.log(u"Failed")