code: def _calc_avg(self, h, t, r, r_inv):
      return (
          torch.sum(h * r * t, -1) + torch.sum(h * r_inv * t, -1)
      ) / 2
  
file_path: OpenKE/openke/module/model/SimplE.py
imports: import torch
  import torch.nn
  from .Model import Model
label_desc: Use image node_id 2 for calling the SimplE obj's underlying member method code with example usage: obj._calc_avg(h, t, r, r_inv) and returns: unknown