code: def make_request_fn():
      """Returns a request function."""
      if FLAGS.cloud_mlengine_model_name:
          request_fn = serving_utils.make_cloud_mlengine_request_fn(
              credentials=GoogleCredentials.get_application_default(),
              model_name=FLAGS.cloud_mlengine_model_name,
              version=FLAGS.cloud_mlengine_model_version,
          )
      else:
          request_fn = serving_utils.make_grpc_request_fn(
              servable_name=FLAGS.servable_name,
              server=FLAGS.server,
              timeout_secs=FLAGS.timeout_secs,
          )
      return request_fn
  
file_path: tensor2tensor/tensor2tensor/serving/query.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from oauth2client.client import GoogleCredentials
  from six.moves import input
  from tensor2tensor import problems
  from tensor2tensor.serving import serving_utils
  from tensor2tensor.utils import hparam
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import usr_dir
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: make_request_fn() and returns: request_fn