code: def get_img_file(dir_name: str) -> List[str]:
      """Get all image file paths in several directories which have the same parent directory."""
      images = []
      for parent, _, filenames in os.walk(dir_name):
          for filename in filenames:
              if not is_image_file(filename):
                  continue
              img_path = os.path.join(parent, filename)
              images.append(img_path)
  
      return images
  
imports: import os
  from typing import Callable, Union, List, Tuple
  import cv2
  import paddle
  import PIL
  import numpy
  import paddle.nn.functional
  from scipy.sparse import csr_matrix
label_desc: Use image node_id 2 for calling a global function with example usage: get_img_file(dir_name) and returns: images