code: def find_dag_file_paths(
      directory: str | os.PathLike[str], safe_mode: bool
  ) -> list[str]:
      """Find file paths of all DAG files."""
      file_paths = []
  
      for file_path in find_path_from_directory(
          directory, ".airflowignore"
      ):
          path = Path(file_path)
          try:
              if path.is_file() and (
                  path.suffix == ".py" or zipfile.is_zipfile(path)
              ):
                  if might_contain_dag(file_path, safe_mode):
                      file_paths.append(file_path)
          except Exception:
              log.exception("Error while examining %s", file_path)
  
      return file_paths
  
imports: from __future__ import annotations
  import ast
  import logging
  import os
  import zipfile
  from io import TextIOWrapper
  from pathlib import Path
  from typing import Generator, NamedTuple, Pattern, Protocol, overload
  import re2
  from pathspec.patterns import GitWildMatchPattern
  from airflow.configuration import conf
  from airflow.exceptions import RemovedInAirflow3Warning
label_desc: Use image node_id 10 for calling a global function with example usage: find_dag_file_paths(directory, safe_mode) and returns: file_paths