code: def main(version: str):
      log_dir = Path(__file__).parent.joinpath(version)
      branch = f"releases/{version}"
  
      bk = get_buildkite_api()
      build_dict_list = bk.builds().list_all_for_pipeline(
          organization=BUILDKITE_ORGANIZATION,
          pipeline=BUILDKITE_PIPELINE,
          branch=branch,
      )
      fetched_results = get_results_from_build_collection(
          bk, build_dict_list
      )
      write_results(log_dir, fetched_results)
  
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 8 for calling a global function with example usage: main(version) without return types