def METHOD_NAME(self) -> str:
    """
    Get the default name for this metric by the following rules:
    * If metric is a function, the function's name.
    * If metric is a callable object, the object's class name.
    :return: The metric default name.
    """
    # Function object have __name__ where classes instances have __class__.__name__:
    name = getattr(self._metric, "__name__", None)
    return name if name is not None else self._metric.__class__.__name__