<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_across_link(self, address, data, x, y, link):
 """Write a bytestring to an address in memory on a neigbouring chip. .. warning:: This function is intended for low-level debug use only and is not optimised for performance nor intended for more general use. This method instructs a monitor processor to send 'POKE' nearest-neighbour packets to a neighbouring chip. These packets are handled directly by the SpiNNaker router in the neighbouring chip, potentially allowing advanced debug or recovery of a chip rendered otherwise unreachable. Parameters address : int The address at which to start writing the data. Only addresses in the system-wide address map may be accessed. Addresses must be word aligned. data : :py:class:`bytes` Data to write into memory. Must be a whole number of words in length. Large writes are automatically broken into a sequence of SCP link-write commands. x : int y : int The coordinates of the chip from which the command will be sent, *not* the coordinates of the chip on which the write will be performed. link : :py:class:`rig.links.Links` The link down which the write should be sent. """

        if address % 4:
            raise ValueError("Addresses must be word-aligned.")
        if len(data) % 4:
            raise ValueError("Data must be a whole number of words.")

        length_bytes = len(data)
        cur_byte = 0

        # Write the requested data, one SCP packet worth at a time
        while length_bytes > 0:
            to_write = min(length_bytes, (self.scp_data_length & ~0b11))
            cur_data = data[cur_byte:cur_byte + to_write]
            self._send_scp(x, y, 0, SCPCommands.link_write,
                           arg1=address, arg2=to_write, arg3=int(link),
                           data=cur_data, expected_args=0)

            # Move to the next block to write
            address += to_write
            cur_byte += to_write
            length_bytes -= to_write