def set_data(self, data: HexDataBuffer, start_addr: HexAddress = 0, num_bytes: int | None = None) -> None:
        """
        Assign the buffer to be displayed with bytes.
        """
        self.data = data
        self.start_addr = start_addr
        self.num_bytes = num_bytes if num_bytes is not None else len(data)
        self.read_func = self._simple_read_callback
        self.write_func = self._simple_write_callback
        self._set_data_common()

        Assign the buffer to be displayed with bytes.
        
angrmanagement/ui/views/hex_view.py