def __call__(self, *args, **kwargs) -> Any:
        """Computes the metric based on it's accumulated state.

        By default, this is called at the end of each batch
        (`on_batch_end` event).
        Returns computed value if `compute_on_call=True`.

        Args:
            *args: Arguments passed to update method.
            **kwargs: Keyword-arguments passed to update method.

        Returns:
            Any: computed value, it's better to return key-value.
        """
        value = self.update(*args, **kwargs)
        return self.compute() if self.compute_on_call else value
Computes the metric based on it's accumulated state.

        By default, this is called at the end of each batch
        (`on_batch_end` event).
        Returns computed value if `compute_on_call=True`.

        Args:
            *args: Arguments passed to update method.
            **kwargs: Keyword-arguments passed to update method.

        Returns:
            Any: computed value, it's better to return key-value.
        
catalyst/metrics/_metric.py