code: def row_generator(x):
      """Returns a single entry in the generated dataset. Return a bunch of random values as an example."""
      return {
          "id": x,
          "image1": np.random.randint(
              0, 255, dtype=np.uint8, size=(128, 256, 3)
          ),
          "array_4d": np.random.randint(
              0, 255, dtype=np.uint8, size=(4, 128, 30, 3)
          ),
      }
  
imports: import numpy
  from pyspark.sql import SparkSession
  from pyspark.sql.types import IntegerType
  from petastorm.codecs import ScalarCodec, CompressedImageCodec, NdarrayCodec
  from petastorm.etl.dataset_metadata import materialize_dataset
  from petastorm.unischema import dict_to_spark_row, Unischema, UnischemaField
label_desc: Use image node_id 1 for calling a global function with example usage: row_generator(x) and returns: dict