code: def standardize(item, structure, array_dict_types):
      """Standardize all rows/entries in dataset to fit the schema.
  
      Will look for missing values and fill it in so all rows have
      the same items and structure.
      """
      for k, v in structure.items():
          if k not in item:
              # If the structure/field does not exist
              if isinstance(v, dict) and (k not in array_dict_types):
                  # If key k is of type dict, and not not a type list[dict]
                  item[k] = {}
                  standardize(item[k], v, array_dict_types)
              elif isinstance(v, dict) and (k in array_dict_types):
                  # If key k is of type dict, and is actually of type list[dict],
                  # just treat as a list and set to None by default
                  item[k] = None
              else:
                  # Assign a default type
                  item[k] = v()
          else:
              # If the structure/field already exists and is a list or dict
              if isinstance(item[k], list):
                  # ignore if item is a nested list structure or list of non-dicts
                  condition = (
                      not (
                          len(item[k]) > 0
                          and isinstance(item[k][0], list)
                      )
                  ) and (
                      not (
                          len(item[k]) > 0
                          and not (
                              isinstance(item[k][0], list)
                              or isinstance(item[k][0], dict)
                          )
                      )
                  )
                  if condition:
                      for sub_item in item[k]:
                          standardize(sub_item, v, array_dict_types)
              elif isinstance(item[k], dict):
                  standardize(item[k], v, array_dict_types)
  
file_path: wandb/wandb/integration/prodigy/prodigy.py
imports: import base64
  import collections.abc
  import io
  import urllib
  from copy import deepcopy
  import pandas
  from PIL import Image
  import wandb
  from wandb import util
  from wandb.plots.utils import test_missing
  from wandb.sdk.lib import telemetry
label_desc: Use image node_id 4 for calling a global function with example usage: standardize(item, structure, array_dict_types) without return types