code: def get_config(model, algorithm_name):
      extra_display = ["cost"]
      if (
          not algorithm_name == "cosine"
          and not algorithm_name == "center"
      ):
          extra_display = extra_display + [
              "loss/pos-dist",
              "loss/neg-dist",
          ]
  
      return TrainConfig(
          dataflow=model.get_data(),
          model=model(),
          callbacks=[
              ModelSaver(),
              ScheduledHyperParamSetter(
                  "learning_rate", [(10, 1e-5), (20, 1e-6)]
              ),
          ],
          extra_callbacks=[
              MovingAverageSummary(),
              ProgressBar(extra_display),
              MergeAllSummaries(),
              RunUpdateOps(),
          ],
          max_epoch=20,
      )
  
imports: import argparse
  import numpy
  import tensorflow
  import tensorflow.contrib.slim
  from tensorpack import *
  from tensorpack.tfutils.summary import add_moving_summary
  from tensorpack.utils.gpu import change_gpu
  from embedding_data import MnistPairs, MnistTriplets, get_test_data
label_desc: Use image node_id 6 for calling a global function with example usage: get_config(model, algorithm_name) and returns: TrainConfig