def forward(self, *inputs: torch.Tensor) -> torch.Tensor | tuple[torch.Tensor, ...]:
        """Apply randomly selected transforms to the input.

        Args:
            *inputs: Input tensors to transform.

        Returns:
            Transformed tensor(s).
        """
        # First determine number of transforms to apply
        num_transforms = (
            self.num_transforms if self.fixed_num_transforms else int(torch.randint(self.num_transforms, (1,)) + 1)
        )
        # Get transforms
        idx = torch.multinomial(torch.tensor(self.probabilities), num_transforms).tolist()
        transform = v2.Compose([self.transforms[i] for i in idx])
        return transform(*inputs)
Apply randomly selected transforms to the input.

        Args:
            *inputs: Input tensors to transform.

        Returns:
            Transformed tensor(s).
        
src/anomalib/data/transforms/multi_random_choice.py