code: def _is_valid_file(f, extensions=(".jpg", ".jpeg", ".png", ".bmp")):
      return f.lower().endswith(extensions)
  
imports: import os
  import copy
  import numpy
  from paddle.io import Dataset
  from ppdet.core.workspace import register, serializable
  from ppdet.utils.download import get_dataset_path
  from ppdet.data import source
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 1 for calling a global function with example usage: _is_valid_file(f, extensions) and returns: f