in deploy_code/multipagepdfa2i_humancomplete/clean_data.py [0:0]
def get_key_value_set(data):
dict_key_value = {}
for block in data["blocks"]:
if block["blockType"] == "KEY_VALUE_SET" and "relationships" in block:
dict_key_value[block["id"]] = {
"relationships": block["relationships"],
"entityTypes": block["entityTypes"]
}
return dict_key_value