def METHOD_NAME(map_data):
    # Iterate through all of the map's prototypes.
    for map_prototype in map_data["entities"]:
        # Iterate through all of the instances of said prototype.
        for map_entity in map_prototype["entities"]:
            tidy_entity(map_entity)