<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_tiff_image(filename, image, compress=False):
 """ Write image data to TIFF file :param filename: name of file to write data to :type filename: str :param image: image data to write to file :type image: numpy array :param compress: whether to compress data. If ``True``, lzma compression is used. Default is ``False`` :type compress: bool """

    if compress:
        return tiff.imsave(filename, image, compress='lzma')  # loseless compression, works very well on masks
    return tiff.imsave(filename, image)