def METHOD_NAME(self):
    # From https://github.com/fepegar/torchio/issues/626
    a = torch.tensor([[1, 0, 0], [0, 1, 0], [0, 0, 1]]).reshape(1, 3, 3, 1)
    image = tio.LabelMap(tensor=a)
    aff = tio.RandomAffine(translation=(0, 1, 1), default_pad_value='otsu')
    transformed = aff(image)
    assert all(n in (0, 1) for n in transformed.data.flatten())