<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def swd_sync(self, pad=False):
 """Causes a flush to write all data remaining in output buffers to SWD device. Args: self (JLink):
 the ``JLink`` instance pad (bool):
 ``True`` if should pad the data to full byte size Returns: ``None`` """

        if pad:
            self._dll.JLINK_SWD_SyncBytes()
        else:
            self._dll.JLINK_SWD_SyncBits()
        return None