code: def _get_hparams_path():
      """Get hyper-parameters file path."""
      hparams_path = None
      if FLAGS.output_dir:
          hparams_path = os.path.join(FLAGS.output_dir, "hparams.json")
      elif (
          FLAGS.checkpoint_path
      ):  # Infer hparams.json from checkpoint path
          hparams_path = os.path.join(
              os.path.dirname(FLAGS.checkpoint_path), "hparams.json"
          )
  
      # Check if hparams_path really exists
      if hparams_path:
          if tf.gfile.Exists(hparams_path):
              tf.logging.info("hparams file %s exists", hparams_path)
          else:
              tf.logging.info(
                  "hparams file %s does not exist", hparams_path
              )
              hparams_path = None
  
      # Can't find hparams_path
      if not hparams_path:
          tf.logging.warning(
              "--output_dir not specified or file hparams.json does not exists. "
              "Hyper-parameters will be infered from --hparams_set and "
              "--hparams only. These may not match training time hyper-parameters."
          )
  
      return hparams_path
  
file_path: tensor2tensor/tensor2tensor/serving/export.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from tensor2tensor.bin import t2t_trainer
  from tensor2tensor.utils import decoding
  from tensor2tensor.utils import t2t_model
  from tensor2tensor.utils import trainer_lib
  from tensor2tensor.utils import usr_dir
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
  import tensorflow_hub
label_desc: Use image node_id 1 for calling a global function with example usage: _get_hparams_path() and returns: hparams_path