code: def build_loss(config):
      copy_config = copy.deepcopy(config)
      loss_type = copy_config.pop("type")
      assert (
          loss_type in support_loss
      ), f"all support loss is {support_loss}"
      criterion = eval(loss_type)(**copy_config)
      return criterion
  
label_desc: Use image node_id 1 for calling a global function with example usage: build_loss(config) and returns: criterion