code: def get_machine_type(cpu_cores, memory, accelerator_type):
      """Returns the GCP AI Platform machine type."""
      if (
          accelerator_type.value == "TPU_V2"
          or accelerator_type.value == "TPU_V3"
      ):
          return "cloud_tpu"
      machine_type_map = {
          (4, 15): "n1-standard-4",
          (8, 30): "n1-standard-8",
          (16, 60): "n1-standard-16",
          (32, 120): "n1-standard-32",
          (64, 240): "n1-standard-64",
          (96, 360): "n1-standard-96",
          (2, 13): "n1-highmem-2",
          (4, 26): "n1-highmem-4",
          (8, 52): "n1-highmem-8",
          (16, 104): "n1-highmem-16",
          (32, 208): "n1-highmem-32",
          (64, 416): "n1-highmem-64",
          (96, 624): "n1-highmem-96",
          (16, 14.4): "n1-highcpu-16",
          (32, 28.8): "n1-highcpu-32",
          (64, 57.6): "n1-highcpu-64",
          (96, 86.4): "n1-highcpu-96",
      }
      return machine_type_map[(cpu_cores, memory)]
  
file_path: cloud/src/python/tensorflow_cloud/core/gcp.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import re
  import google.auth
label_desc: Use image node_id 5 for calling a global function with example usage: get_machine_type(cpu_cores, memory, accelerator_type) and returns: machine_type_map, str