def __post_init__(self) -> None:
        """Validate inputs for result object consistency.

        Raises:
            TypeError: If inputs are invalid.
        """
        try:
            _validate.is_rate_range(
                (self.fpr_lower_bound, self.fpr_upper_bound),
            )
            # TODO(jpcbertoldo): warn when too low (use numpy code params)  # noqa: TD003
            if self.num_thresholds is not None:
                _validate.is_num_thresholds_gte2(self.num_thresholds)
            _validate.is_rates(self.aupimos, nan_allowed=True)

            _validate.validate_threshold_bounds(
                (self.thresh_lower_bound, self.thresh_upper_bound),
            )

        except (TypeError, ValueError) as ex:
            msg = f"Invalid inputs for {self.__class__.__name__} object. Cause: {ex}."
            raise TypeError(msg) from ex
Validate inputs for result object consistency.

        Raises:
            TypeError: If inputs are invalid.
        
src/anomalib/metrics/pimo/dataclasses.py