code: def extract_warnings(artifact_dir, targets):
      """Extract warnings from all artifact files"""
  
      selected_warnings = set()
  
      paths = [
          os.path.join(artifact_dir, p)
          for p in os.listdir(artifact_dir)
          if (p.endswith(".zip") or from_gh)
      ]
      for p in paths:
          selected_warnings.update(
              extract_warnings_from_single_artifact(p, targets)
          )
  
      return selected_warnings
  
file_path: transformers/utils/extract_warnings.py
imports: import argparse
  import json
  import os
  import time
  import zipfile
  from get_ci_error_statistics import download_artifact, get_artifacts_links
  from transformers import logging
label_desc: Use image node_id 2 for calling a global function with example usage: extract_warnings(artifact_dir, targets) and returns: selected_warnings