def _invert_index(orig_map):
    """
        Essentially performs an inverted index operation on orig_map and returns
        the results. In other words, the resulting dict will use orig_map's values
        as the keys; result's values will be the list of keys in orig_map that
        correspond to each value.
    """
    inverted_map = {}
    for key in orig_map:
        orig_value = orig_map[key]
        inverted_values = inverted_map.get(orig_value, [])
        inverted_values.append(key)
        inverted_map[orig_value] = inverted_values
    return inverted_map
