code: def _create_specs(cfg: Dict[str, Any]) -> List[Dict[str, Any]]:
      gpu_cfg = cfg.get("gpu_versions", {})
      python_cfg = cfg.get("python_versions", {})
      base_img_cfg = cfg.get("base_images", {})
      images = cfg.get("images", [])
  
      gpu_specs = _create_gpu_base_image_specs(
          images=images,
          base_img_cfg=base_img_cfg,
          gpu_cfg=gpu_cfg,
      )
  
      cpu_specs = _create_cpu_image_specs(
          images=images,
          base_img_cfg=base_img_cfg,
          cpu_cfg=python_cfg,
      )
  
      specs = list(gpu_specs.values())  # gpu base images
      specs += [
          _create_image_spec(
              cfg=c, cpu_specs=cpu_specs, gpu_specs=gpu_specs
          )
          for c in images
      ]
  
      return specs
  
imports: from absl import flags, app, logging
  from copy import copy
  from typing import Dict, List, Any, NamedTuple, Optional, Set
  from enum import Enum
  import json
  import pprint
label_desc: Use image node_id 7 for calling a global function with example usage: _create_specs(cfg) and returns: specs