code: def create_experiment_fn():
      return trainer_lib.create_experiment_fn(
          model_name=FLAGS.model,
          problem_name=FLAGS.problem,
          data_dir=os.path.expanduser(FLAGS.data_dir),
          train_steps=FLAGS.train_steps,
          eval_steps=FLAGS.eval_steps,
          min_eval_frequency=FLAGS.local_eval_frequency,
          schedule=FLAGS.schedule,
          eval_throttle_seconds=FLAGS.eval_throttle_seconds,
          export=FLAGS.export_saved_model,
          decode_hparams=decoding.decode_hparams(FLAGS.decode_hparams),
          use_tfdbg=FLAGS.tfdbg,
          use_dbgprofile=FLAGS.dbgprofile,
          eval_early_stopping_steps=FLAGS.eval_early_stopping_steps,
          eval_early_stopping_metric=FLAGS.eval_early_stopping_metric,
          eval_early_stopping_metric_delta=FLAGS.eval_early_stopping_metric_delta,
          eval_early_stopping_metric_minimize=FLAGS.eval_early_stopping_metric_minimize,
          eval_timeout_mins=FLAGS.eval_timeout_mins,
          eval_use_test_set=FLAGS.eval_use_test_set,
          use_tpu=FLAGS.use_tpu,
          use_tpu_estimator=FLAGS.use_tpu_estimator,
          use_xla=FLAGS.xla_compile,
          export_saved_model_api_version=FLAGS.export_saved_model_api_version,
          use_guarantee_const_getter=FLAGS.use_guarantee_const_getter,
          warm_start_from=FLAGS.warm_start_from,
          decode_from_file=FLAGS.decode_from_file,
          decode_to_file=FLAGS.decode_to_file,
          decode_reference=FLAGS.decode_reference,
          std_server_protocol=FLAGS.std_server_protocol,
      )
  
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 3 for calling a global function with example usage: create_experiment_fn() and returns: trainer_lib