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
def mask ( self ) : if not hasattr ( self , "_mask" ) : self . _mask = Mask ( self ) if self . has_mask ( ) else None return self . _mask
Returns mask associated with this layer.

        :return: :py:class:`~psd_tools.api.mask.Mask` or `None`