class_docstr: GNNModel 
docstr: loss_func
docstr_tok: ["loss_func"]
code: def loss_func(self, predictions, label=None):
      """loss_func"""
      if "loss" not in self.config.loss_type:
          loss_type = "%s_loss" % self.config.loss_type
      else:
          loss_type = self.config.loss_type
  
      loss_count = 1
      loss = getattr(Loss, loss_type)(self.config, predictions)
  
      if self.config.gcl_loss:
          gcl_loss = getattr(Loss, self.config.gcl_loss)(
              self.config, predictions
          )
          loss += gcl_loss
          loss_count += 1
  
      hcl_logits_list = predictions.get("hcl_logits")
      if (not self.is_predict) and (hcl_logits_list is not None):
          hcl_loss = Loss.hcl_loss(self.config, hcl_logits_list)
          loss += hcl_loss
          loss_count += 1
  
      # for visualization
      v_loss = loss / self.config.batch_size / loss_count
  
      return loss, v_loss
  
imports: import os
  import sys
  import math
  import time
  import numpy
  import pickle
  import paddle
  import paddle.fluid.layers
  import paddle.fluid
  import pgl
  from pgl.utils.logger import log
  from .None import layers
  from .None import model_util
  from .None import loss
  import util
  import helper
  from .auto_heter_gnn import AutoHeterGNN
label_desc: Use image node_id 4 for calling the GNNModel obj's underlying member method code with example usage: obj.loss_func(predictions, label) and returns: loss,  v_loss