code: def images_generator():
      dataset_path = os.path.join(resource_path, "cat_dog")
      for root, dirs, files in os.walk(
          os.path.join(dataset_path, "cats")
      ):
          for name in files:
              image_path = os.path.join(root, name)
              yield {"image": image_path, "label": 1, "id": image_path}
  
      for root, dirs, files in os.walk(
          os.path.join(dataset_path, "dogs")
      ):
          for name in files:
              image_path = os.path.join(root, name)
              yield {"image": image_path, "label": 0, "id": image_path}
  
file_path: BigDL/python/orca/test/bigdl/orca/data/ray/test_read_parquet_images.py
imports: import tempfile
  import shutil
  import pytest
  from unittest import TestCase
  import os
  from bigdl.orca.data.image.parquet_dataset import ParquetDataset, read_parquet
  from bigdl.orca.data.image.utils import DType, FeatureType, SchemaField
  import tensorflow
  from bigdl.orca.ray import OrcaRayContext
label_desc: Use image node_id 1 for calling a global function with example usage: images_generator() without return types