def METHOD_NAME(other_dict, keys):
    for key, val in other_dict.items():
        new_keys = keys + [key]
        if isinstance(val, dict):
            METHOD_NAME(val, new_keys)
        else:
            self.upsert_from_list(new_keys, val, extra_data)