code: def _check_img_ext(path):
      img_extensions = [".jpg", ".jpeg", ".png", ".ppm", ".bmp"]
      return any(
          os.path.splitext(path)[1].lower() == extension
          for extension in img_extensions
      )
  
file_path: chainercv/chainercv/datasets/directory_parsing_label_dataset.py
imports: import numpy
  import os
  from chainercv.chainer_experimental.datasets.sliceable import GetterDataset
  from chainercv.utils import read_image
label_desc: Use image node_id 2 for calling a global function with example usage: _check_img_ext(path) and returns: any