code: def get_all_artifacts(
      builds: Dict[str, Build], cloud_images: bool
  ) -> Dict[str, str]:
      artifacts = {}
      for b in builds.values():
          artifacts.update(b.get_artifacts())
  
      if cloud_images:
          expected = PACKER_ARTIFACTS | DOCKER_ARTIFACTS
      else:
          expected = DOCKER_ARTIFACTS
  
      found = set(artifacts.keys())
      assert (
          expected == found
      ), "expected artifacts\n  {expected_list}\nbut found\n  {found_list}".format(
          expected_list="\n  ".join(sorted(expected)),
          found_list="\n  ".join(sorted(found)),
      )
  
      return artifacts
  
file_path: determined/tools/scripts/update-bumpenvs-yaml.py
imports: import argparse
  import collections
  import itertools
  import os
  import pathlib
  import sys
  from typing import Any, Dict
  import requests
  from ruamel import yaml
label_desc: Use image node_id 2 for calling a global function with example usage: get_all_artifacts(builds, cloud_images) and returns: artifacts