code: def has_file_allowed_extension(
      filename: PATH_TYPE, extensions: Tuple[str, ...]
  ) -> bool:
      """Checks if a file is an allowed extension.
  
      Args:
          filename (string): path to a file
          extensions (tuple of strings): extensions to consider (lowercase)
  
      Returns:
          bool: True if the filename ends with one of given extensions
  
      """
      return str(filename).lower().endswith(extensions)
  
file_path: lightning-flash/src/flash/core/data/utilities/paths.py
imports: import os
  from typing import Any, Callable, List, Optional, Tuple, Union, cast
  from pytorch_lightning.utilities import rank_zero_warn
  from flash.core.data.utilities.sort import sorted_alphanumeric
label_desc: Use image node_id 1 for calling a global function with example usage: has_file_allowed_extension(filename, extensions) and returns: str