code: def should_include_file_in_search(file_name, extensions, exclude_dirs):
      
      return (exclude_dirs is None or not any(file_name.startswith(d) for d in exclude_dirs)) and \
          any(file_name.endswith(e) for e in extensions)
docs: Whether or not a filename matches a search criteria according to arguments.
  
      Args:
          file_name (str): A file path to check.
          extensions (list): A list of file extensions file should match.
          exclude_dirs (list): A list of directories to exclude from search.
  
      Returns:
          A boolean of whether or not file matches search criteria.