I have a udf which takes in a dictionary (the parameter "data") and search inside the dic to return the item_list:
def get_item_list(data): #get ord