code: def create_hparams():
      """Create hparams."""
      if FLAGS.use_tpu and "tpu" not in FLAGS.hparams_set:
          tf.logging.warn(
              "Not all hyperparameter sets work on TPU. "
              "Prefer hparams_sets with a '_tpu' suffix, "
              "e.g. transformer_tpu, if available for your model."
          )
      hparams_path = os.path.join(FLAGS.output_dir, "hparams.json")
      return trainer_lib.create_hparams(
          FLAGS.hparams_set, FLAGS.hparams, hparams_path=hparams_path
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import contextlib
  import os
  import sys
  from tensor2tensor import models
  from tensor2tensor import problems
  from tensor2tensor.data_generators import problem
  from tensor2tensor.utils import cloud_mlengine
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import decoding
  from tensor2tensor.utils import flags
  from tensor2tensor.utils import hparams_lib
  from tensor2tensor.utils import mlperf_log
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import trainer_lib
  from tensor2tensor.utils import usr_dir
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 2 for calling a global function with example usage: create_hparams() and returns: trainer_lib