def METHOD_NAME(self, tensor: Tensor) -> Tensor:
    n_chs = tensor.shape[1]
    slices = torch.split(tensor, 1, dim=1)
    fg = [slices[i] for i in self.foreground]
    bg = sum([slices[i] for i in range(n_chs) if i not in self.foreground])
    output = torch.cat([bg] + fg, dim=1)
    return output