keras/src/layers/core/lambda_layer.py/Lambda/compute_mask
class Lambda:    def compute_mask(self, inputs, mask=None):
        if callable(self.mask):
            return self.mask(inputs, mask)
        return self.mask