class_docstr: Extension that makes a symbolic link to the best model
  
  :param str key: Key of value
  :param str prefix: Prefix of model files and link target
  :param str suffix: Suffix of link target
class_docstr_tok: ["Extension","that","makes","a","symbolic","link","to","the","best","model",":","param","str","key",":","Key","of","value",":","param","str","prefix",":","Prefix","of","model","files","and","link","target",":","param","str","suffix",":","Suffix","of","link","target"]
code: def __call__(self, trainer):
      observation = trainer.observation
      if self.key in observation:
          loss = observation[self.key]
          if self.best_model == -1 or loss < self.min_loss:
              self.min_loss = loss
              self.best_model = trainer.updater.epoch
              src = "%s.%d" % (self.prefix, self.best_model)
              dest = os.path.join(
                  trainer.out, "%s.%s" % (self.prefix, self.suffix)
              )
              if os.path.lexists(dest):
                  os.remove(dest)
              os.symlink(src, dest)
              logging.info("best model is " + src)
  
imports: import logging
  import os
  import random
  import chainer
  import h5py
  import numpy
  from chainer.training import extension
  from tqdm import tqdm
label_desc: Use image node_id 2 for calling the MakeSymlinkToBestModel obj's underlying member method code with example usage: obj.__call__(trainer) without return types