def METHOD_NAME(self, alphasets_shape):
    if alphasets_shape == self.alphasets_shape:
        return
    tensorlib, _ = get_backend()
    self.alphasets_shape = alphasets_shape
    self.mask_on = tensorlib.ones(self.alphasets_shape)
    self.mask_off = tensorlib.zeros(self.alphasets_shape)