<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def topil(self, **kwargs):
 """ Get PIL Image. :return: :py:class:`PIL.Image`, or `None` if the composed image is not available. """

        if self.has_preview():
            return pil_io.convert_image_data_to_pil(self._record, **kwargs)
        return None