def forward(
        self,
        input_tensor: list[torch.Tensor],
        rev: bool = False,
        jac: bool = True,
    ) -> tuple[list[torch.Tensor], float]:
        """Apply permutation or inverse permutation to inputs.

        Args:
            input_tensor (list[torch.Tensor]): List of input tensors.
            rev (bool, optional): If ``True``, applies inverse permutation.
                Defaults to ``False``.
            jac (bool, optional): Unused. Required for interface compatibility.
                Defaults to ``True``.

        Returns:
            tuple[list[torch.Tensor], float]: Permuted tensors and log determinant (0).
        """
        del jac  # Unused argument.

        if not rev:
            return [input_tensor[i][:, self.perm[i]] for i in range(self.n_inputs)], 0.0

        return [input_tensor[i][:, self.perm_inv[i]] for i in range(self.n_inputs)], 0.0
Apply permutation or inverse permutation to inputs.

        Args:
            input_tensor (list[torch.Tensor]): List of input tensors.
            rev (bool, optional): If ``True``, applies inverse permutation.
                Defaults to ``False``.
            jac (bool, optional): Unused. Required for interface compatibility.
                Defaults to ``True``.

        Returns:
            tuple[list[torch.Tensor], float]: Permuted tensors and log determinant (0).
        
src/anomalib/models/image/csflow/torch_model.py