def _return_replacement(inp_tuple, argmax, disambiguations):
    """
    Args:
        - inp_tuple = the input tuple which needs to be counterchecked with the
                      dictionary.
        - disambiguations = dictionary with all the replacements.
        - argmax = boolean of whether to take the argmax or not, in case of
                   ambiguous cases.
    Returns:
        - The recommended replacements as stored in the values of
          disambiguations. It returns None in case of no replacements.

    This function strictly serves to return the replacements for ambiguous
    cases, i.e. as stored in disambiguations.yaml.
    """

    if inp_tuple in disambiguations:
        if len(disambiguations[inp_tuple].keys()) == 1:
            # if this is unambiguous just handle it
            return list(disambiguations[inp_tuple])[0]
        else:
            if not argmax:
                # if one should not take the argmax just replace nothing. This
                # is not recommended, but in the future it might be interesting
                # to differentiate the cases.
                return None
            # if it is ambiguous find the case with the most occurences
            max_val = max(disambiguations[inp_tuple].values())
            if list(disambiguations[inp_tuple].values()).count(max_val) == 1:
                # if there is exactly one replacement with the highest
                # value, choose that
                for key, value in disambiguations[inp_tuple].items():
                    if value == max_val:
                        return key
            else:
                # if it is still ambigious just stop at this point and
                # work on the disambiguations dictionary.
                return None
    else:
        # if the case is not even in the dictionary just skip it and
        # work on the disambiguations dictionary.
        return None