code: def validate_flags():
      """Validates flags are set to acceptable values for CloudML Engine runs."""
      assert not job_dir()
      assert FLAGS.output_dir.startswith("gs://")
      assert FLAGS.data_dir.startswith("gs://")
      assert FLAGS.worker_replicas <= 1
      assert FLAGS.ps_replicas <= 0
      if FLAGS.hparams_range:
          assert FLAGS.autotune_objective
      if FLAGS.worker_gpu:
          assert FLAGS.worker_gpu in [1, 4, 8]
      if FLAGS.cloud_mlengine_master_type:
          if FLAGS.worker_gpu:
              if FLAGS.worker_gpu == 1:
                  assert FLAGS.cloud_mlengine_master_type in [
                      "standard_gpu",
                      "standard_p100",
                      "standard_v100",
                  ]
              elif FLAGS.worker_gpu == 4:
                  assert FLAGS.cloud_mlengine_master_type in [
                      "complex_model_m_gpu",
                      "complex_model_m_p100",
                      "complex_model_m_v100",
                  ]
              else:
                  assert FLAGS.cloud_mlengine_master_type in [
                      "complex_model_l_gpu",
                      "complex_model_l_v100",
                  ]
          else:
              assert FLAGS.cloud_mlengine_master_type in [
                  "standard",
                  "large_model",
                  "complex_model_s",
                  "complex_model_m",
                  "complex_model_l",
              ]
  
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 20 for calling a global function with example usage: validate_flags() without return types