code: def get_results_artifact_for_job(
      bk: Buildkite, job: Job
  ) -> Optional[Dict]:
      artifacts = bk.artifacts().list_artifacts_for_job(
          organization=job.build.organization,
          pipeline=job.build.pipeline,
          build=job.build.number,
          job=job.id,
      )
      for artifact in artifacts:
          if "result.json" in artifact["filename"]:
              artifact = Artifact(job=job, id=artifact["id"])
              return download_results_artifact(bk=bk, artifact=artifact)
      return None
  
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 5 for calling a global function with example usage: get_results_artifact_for_job(bk, job) and returns: None, download_results_artifact