code: def losses(config):
      """get loss object from register"""
      if (
          "distilling" in config["solver"]
          and config["solver"]["distilling"]["enable"]
      ):
          loss_name = config["solver"]["distilling"]["loss"]
      else:
          loss_name = config["solver"]["optimizer"]["loss"]
      if isinstance(loss_name, list):
          _loss_fn = []
          for one_loss_name in loss_name:
              logging.info("loss == {}".format(one_loss_name))
              _loss_fn.append(registers.loss[one_loss_name](config))
      else:
          logging.info("loss == {}".format(loss_name))
          _loss_fn = registers.loss[loss_name](config)
      return _loss_fn
  
imports: import os
  from absl import logging
  import numpy
  import delta.compat
  from tensorflow.python.client import device_lib
  from tensorflow.python.estimator.canned import metric_keys
  from tensorflow.python.util import nest
  from delta.utils.register import registers
label_desc: Use image node_id 5 for calling a global function with example usage: losses(config) and returns: _loss_fn