def get_key_for_value(dict_, value, default=None):
    """
    A util function for dict reverse lookup.
    Mostly used to find the species name from nameId given a species_name -> nameId dict
    :param dict_:
    :param value:
    :param default:
    :return: the key for the given value of default
    """
    for k, v in dict_.items():
        if v == value:
            return k
    return default