<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reset(self, ms=0, halt=True):
 """Resets the target. This method resets the target, and by default toggles the RESET and TRST pins. Args: self (JLink):
 the ``JLink`` instance ms (int):
 Amount of milliseconds to delay after reset (default: 0) halt (bool):
 if the CPU should halt after reset (default: True) Returns: Number of bytes read. """

        self._dll.JLINKARM_SetResetDelay(ms)

        res = self._dll.JLINKARM_Reset()
        if res < 0:
            raise errors.JLinkException(res)
        elif not halt:
            self._dll.JLINKARM_Go()

        return res