def _get_max_interval(stinfo):
    """
    Returns the maximum statistics collection interval value for all enabled statistics in
    'stinfo'.
    """

    intervals = []
    for info in stinfo.values():
        if info["enabled"] and info["interval"] is not None:
            intervals.append(info["interval"])

    if intervals:
        return max(intervals)

    return 0