<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def jtag_enable(self):
 """ Enables JTAG output on the controller. JTAG operations executed before this function is called will return useless data or fail. Usage: """

        status, _ = self.bulkCommand(_BMSG_ENABLE_JTAG)
        if status == 0:
            self._jtagon = True
        elif status == 3:
            self._jtagon = True
            raise JTAGAlreadyEnabledError()
        else:
            raise JTAGEnableFailedError("Error enabling JTAG. Error code: %s." %status)