code: def test_read_images_pil_with_masks(self):
      image_path = os.path.join(self.resource_path, "tsg_salt/images")
      target_path = os.path.join(self.resource_path, "tsg_salt/masks")
  
      data_shard = bigdl.orca.data.read_images(
          image_path,
          target_path=target_path,
          image_type=".png",
          target_type=".png",
      )
      print(len(data_shard))
      collected = data_shard.collect()
      for im in collected:
          self.assertTrue(
              isinstance(im, tuple)
              and isinstance(im[0], PIL.Image.Image)
              and isinstance(im[1], PIL.Image.Image)
          )
      self.assertTrue(data_shard.rdd.count() == 5)
  
file_path: BigDL/python/orca/test/bigdl/orca/data/test_image_preprocessing.py
imports: import os.path
  import pytest
  from unittest import TestCase
  import bigdl.orca.data
  from bigdl.orca.data.image.preprocessing import read_images_pil, read_images_spark
  from bigdl.dllib.nncontext import *
  import PIL
label_desc: Use image node_id 7 for calling the TestImagePreprocessing obj's underlying member method code with example usage: obj.test_read_images_pil_with_masks() without return types