code: def _scan_pth_files(dir_paths):
      
      for dir_path in dir_paths:
        if not os.path.exists(dir_path):
          continue
  
        pth_filenames = (f for f in os.listdir(dir_path) if f.endswith('.pth'))
        for pth_filename in pth_filenames:
          yield os.path.join(dir_path, pth_filename)
docs: Given an iterable of directory paths, yield paths to all .pth files within.