def _default_metric_compare_fn(last_metrics, new_metrics):
    """Compare two metrics

    Args:
        last_metrics: previous metrics. A comparable object.
        new_metrics: new metrics. A comparable object.

    Returns:
        True if new_metrics is equal to or better than the last_metrics.
            False, otherwise.
    """
    if last_metrics is None:
        return True
    if new_metrics is None:
        return False
    try:
        better = not (last_metrics > new_metrics)
        return better
    except TypeError:
        raise TypeError(
            'Metrics are not comparable: {} vs {}'.format(
                type(last_metrics).__name__, type(new_metrics).__name__
            )
        )
    except Exception:
        # unknown error
        raise
    return False