def METHOD_NAME(ax, simple_labels_dict):
    """
    Replaces two labels by one as defined in a dictionary.
    Parameters
    ----------
    ax: matplotlib.axes
        The axes containing the plot for which the labels shall be simplified
    simple_labels_dict:
        dictionary which contains the simplified label as a key
        and for every key a list of two labels
        which shall be replaced by the simplified label as value
    Returns
    -------
    """
    handles, labels = ax.get_legend_handles_labels()
    for key, value in simple_labels_dict.items():
        if value[0] in labels and value[1] in labels:
            labels = [
                key if item == value[0] else "_Hidden" if item == value[1] else item
                for item in labels
            ]
    return handles, labels