code: def find_files(root, pattern):
      
      results = []
      for base, dirs, files in os.walk(root):
          matched = fnmatch.filter(files, pattern)
          results.extend(os.path.join(base, f) for f in matched)
      return results
docs: Find all files matching the glob pattern recursively
  
      :param root: string
      :param pattern: string
      :return: list of file paths relative to root