<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def swo_disable(self, port_mask):
 """Disables ITM & Stimulus ports. Args: self (JLink):
 the ``JLink`` instance port_mask (int):
 mask specifying which ports to disable Returns: ``None`` Raises: JLinkException: on error """

        res = self._dll.JLINKARM_SWO_DisableTarget(port_mask)
        if res != 0:
            raise errors.JLinkException(res)
        return None