<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mask(self):
 """ Returns mask associated with this layer. :return: :py:class:`~psd_tools.api.mask.Mask` or `None` """

        if not hasattr(self, "_mask"):
            self._mask = Mask(self) if self.has_mask() else None
        return self._mask