code: def write_results(
      log_dir: Path, fetched_results: Dict[str, Any]
  ) -> None:
      log_dir.mkdir(parents=True, exist_ok=True)
  
      for filepath, content in fetched_results.items():
          path = log_dir.joinpath(filepath)
          path.parent.mkdir(parents=True, exist_ok=True)
  
          print(f"Writing {path}")
  
          with open(path, "w") as fp:
              json.dump(content, fp, sort_keys=True, indent=4)
              fp.write("\n")
  
file_path: ray/release/release_logs/fetch_release_logs.py
imports: import json
  import os
  import re
  from dataclasses import dataclass
  from pathlib import Path
  from typing import Any, Dict, List, Optional
  import boto3
  import click
  from pybuildkite.buildkite import Buildkite
label_desc: Use image node_id 7 for calling a global function with example usage: write_results(log_dir, fetched_results) without return types