code: def has_ext(
      fname: str, extensions: Union[str, Iterable[str]]
  ) -> bool:
      if not isinstance(extensions, (str, list, tuple)):
          raise ValueError(
              "Argument extensions must be either string or list of strings"
          )
      if isinstance(extensions, str):
          extensions = [extensions]
      extensions = set(map(str.lower, extensions))
  
      name, ext = os.path.splitext(fname)
      return ext.lower() in extensions
  
file_path: pytorch-toolbelt/pytorch_toolbelt/utils/fs.py
imports: import glob
  import os
  from pathlib import Path
  from typing import Union, List, Iterable
  import cv2
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: has_ext(fname, extensions) and returns: unknown