import pathlib


def _get_limits_path(hist_file):
    """Figure out the appropriate file name for the histogram limits
    file.

    Args:
        hist_file: The path to the histogram file.

    Returns:
        A string with the path to the limits file.
    """
    hist_path = pathlib.Path(hist_file)
    return hist_path.parent / hist_path.name.replace('hist', 'lim')