code: def _setup_gin():
    
    # Imports for configurables
    # pylint: disable=g-import-not-at-top,unused-import,g-bad-import-order,reimported,unused-variable
    from tensor2tensor.trax import models as _trax_models
    from tensor2tensor.trax import optimizers as _trax_opt
    # pylint: disable=g-import-not-at-top,unused-import,g-bad-import-order,reimported,unused-variable
  
    configs = FLAGS.config or []
    # Override with --dataset and --model
    if FLAGS.dataset:
      configs.append("inputs.dataset_name='%s'" % FLAGS.dataset)
      if FLAGS.data_dir:
        configs.append("inputs.data_dir='%s'" % FLAGS.data_dir)
    if FLAGS.model:
      configs.append("train.model=@trax.models.%s" % FLAGS.model)
    gin.parse_config_files_and_bindings(FLAGS.config_file, configs)
docs: Setup gin configuration.