code: def read_images(
      file_path: str,
      label_func: Callable = None,
      target_path: str = None,
      image_type: str = ".jpg",
      target_type: str = ".png",
      backend: str = "pillow",
  ):
      backend = backend.lower()
      invalidInputError(
          backend == "spark" or backend == "pillow",
          "backend of read_images must be either spark or pillow",
      )
      if backend == "spark":
          images = read_images_spark(
              file_path,
              label_func,
              target_path,
              image_type,
              target_type,
          )
      else:
          images = read_images_pil(
              file_path,
              label_func,
              target_path,
              image_type,
              target_type,
          )
      return images
  
file_path: BigDL/python/orca/src/bigdl/orca/data/image/preprocessing.py
imports: from bigdl.orca import OrcaContext
  from typing import TYPE_CHECKING, Any, Tuple
  from bigdl.orca.data.file import *
  from bigdl.orca.data.utils import *
  from bigdl.orca.data import SparkXShards
  from pyspark.sql.functions import col, explode, collect_list
  from bigdl.dllib.utils.log4Error import invalidInputError
  from bigdl.dllib.utils.common import get_node_and_core_number
  import os.path
label_desc: Use image node_id 2 for calling a global function with example usage: read_images(file_path, label_func, target_path, image_type, target_type, backend) and returns: images