code: def build_for_all_versions(
      image_name, py_versions, image_types, suffix, **kwargs
  ) -> List[str]:
      """Builds the given Docker image for all Python & CUDA versions"""
      tagged_names = []
      for py_version in py_versions:
          for image_type in image_types:
              tagged_name = _build_docker_image(
                  image_name,
                  py_version=py_version,
                  image_type=image_type,
                  suffix=suffix,
                  **kwargs,
              )
              tagged_names.append(tagged_name)
      return tagged_names
  
imports: import datetime
  import io
  import json
  import functools
  import glob
  import itertools
  import os
  import platform
  import shutil
  import subprocess
  import sys
  import tarfile
  from collections import defaultdict
  from pathlib import Path
  from typing import List, Optional, Tuple, Dict
  import click
  import docker
label_desc: Use image node_id 16 for calling a global function with example usage: build_for_all_versions(image_name, py_versions, image_types, suffix) and returns: tagged_names