code: def grab(args, vhash, bnum):
      # curl -H "Circle-Token: $CIRCLECI_TOKEN" https://circleci.com/api/v1.1/project/github/wandb/wandb/61238/artifacts
      # curl -L  -o out.dat -H "Circle-Token: $CIRCLECI_TOKEN" https://61238-86031674-gh.circle-artifacts.com/0/cover-results/.coverage
      cachedir = ".circle_cache"
      cfbase = f"cover-{vhash}-{bnum}.xml"
      cfname = os.path.join(cachedir, cfbase)
      if not os.path.exists(cachedir):
          os.mkdir(cachedir)
      if os.path.exists(cfname):
          return
      url = f"https://circleci.com/api/v1.1/project/github/wandb/wandb/{bnum}/artifacts"
      r = requests.get(url, auth=(args.api_token, ""))
      assert r.status_code == 200, f"Error making api request: {r}"
      lst = r.json()
      if not lst:
          return
      for item in lst:
          p = item.get("path")
          u = item.get("url")
          # print("got", p)
          if p != "cover-results/coverage.xml":
              continue
          # print("GRAB", p, u)
          # TODO: use tempfile
          print("Downloading circle artifacts...")
          s, o = subprocess.getstatusoutput(
              f'curl -L  -o out.dat -H "Circle-Token: {args.api_token}" {u!r}'
          )
          assert s == 0
          os.rename("out.dat", cfname)
  
file_path: wandb/tools/circleci-tool.py
imports: import argparse
  import os
  import subprocess
  import sys
  import time
  import requests
label_desc: Use image node_id 5 for calling a global function with example usage: grab(args, vhash, bnum) without return types