<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compress(data, format=FORMAT_XZ, check=-1, preset=None, filters=None):
 """Compress a block of data. Refer to LZMACompressor's docstring for a description of the optional arguments *format*, *check*, *preset* and *filters*. For incremental compression, use an LZMACompressor object instead. """

    comp = LZMACompressor(format, check, preset, filters)
    return comp.compress(data) + comp.flush()