"""Module for defining the HasCustomStatistics interface.

Copyright © 2024 Pixelgen Technologies AB.
"""

import abc
from typing import Any


class HasCustomStatistics(abc.ABC):
    """Base class enabling reducing arbitrary statistics from different workers.

    Pipeline steps that generate statistics should inherit from this class.
    """

    @abc.abstractmethod
    def get_statistics_name(self) -> str:
        """Return a string reprenting statistics generated by this Pipeline step."""
        raise NotImplementedError

    @abc.abstractmethod
    def get_statistics(self) -> Any:
        """Return the statistics collected by this Pipeline step."""
        raise NotImplementedError
