code: def launch():
      """Launch t2t_trainer on Cloud ML Engine."""
      validate_flags()
      job_spec = configure_job()
      job_name = job_spec["jobId"]
      tf.logging.info(
          "Launching job %s with ML Engine spec:\n%s",
          job_name,
          pprint.pformat(job_spec),
      )
      assert confirm()
      train_dir = FLAGS.output_dir
      t2t_tar = tar_and_copy_t2t(train_dir)
      configure_trainer_package(job_spec, t2t_tar)
      if FLAGS.t2t_usr_dir:
          usr_tar = tar_and_copy_usr_dir(FLAGS.t2t_usr_dir, train_dir)
          configure_usr_dir(job_spec, usr_tar)
      launch_job(job_spec)
      tf.logging.info(
          "Launched %s. See console to track: %s.",
          job_name,
          CONSOLE_URL,
      )
      tf.logging.info(
          "Interact with the training job from the command line:"
      )
      tf.logging.info(
          "Abort job: gcloud ml-engine jobs cancel %s", job_name
      )
      tf.logging.info(
          "Stream logs: gcloud ml-engine jobs stream-logs %s", job_name
      )
      tf.logging.info(
          "Open tensorboard: tensorboard --logdir %s", train_dir
      )
  
imports: import datetime
  import os
  import pprint
  import shutil
  import subprocess
  import sys
  import tempfile
  from googleapiclient import discovery
  from oauth2client.client import GoogleCredentials
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import usr_dir
  import tensorflow.compat.v1
label_desc: Use image node_id 22 for calling a global function with example usage: launch() without return types