code: def struct_generator(dtype, cardinality, size, max_null_frequency):
      """
      Generator for struct data
      """
      return lambda: get_nested_structs(
          dtype=dtype,
          cardinality=cardinality,
          size=size,
          max_null_frequency=max_null_frequency,
      )
  
imports: import copy
  import random
  import string
  import uuid
  from multiprocessing import Pool
  import numpy
  import pandas
  import pyarrow
  from pyarrow import parquet
  import cudf
  from cudf.utils.dtypes import np_to_pa_dtype
label_desc: Use image node_id 18 for calling a global function with example usage: struct_generator(dtype, cardinality, size, max_null_frequency) and returns: function