code: def create_teacher_experiment(run_config, hparams, argv):
    
    tf.logging.info("training teacher")
    tf.logging.set_verbosity(tf.logging.INFO)
    trainer_lib.set_random_seed(FLAGS.random_seed)
    usr_dir.import_usr_dir(FLAGS.t2t_usr_dir)
    t2t_trainer.maybe_log_registry_and_exit()
  
    if FLAGS.cloud_mlengine:
      return cloud_mlengine.launch()
  
    if FLAGS.generate_data:
      t2t_trainer.generate_data()
  
    if cloud_mlengine.job_dir():
      FLAGS.output_dir = cloud_mlengine.job_dir()
  
    if argv:
      t2t_trainer.set_hparams_from_args(argv[1:])
  
    hparams.distill_phase = "train"
    exp_fn = t2t_trainer.create_experiment_fn()
    exp = exp_fn(run_config, hparams)
    return exp
docs: Creates experiment function.