code: def enc_forward(
      self,
      batch,
      ent_mask,
      ent_text_mask,
      ent_len,
      rel_mask,
      title_mask,
  ):
      title_enc = None
      if self.args.title:
          title_enc = self.title_enc(
              self.title_emb(batch["title"]), title_mask
          )
      ent_enc = self.ent_enc(
          self.ent_emb(batch["ent_text"]),
          ent_text_mask,
          ent_len=batch["ent_len"],
      )
      rel_emb = self.rel_emb(batch["rel"])
      g_ent, g_root = self.graph_enc(
          ent_enc, ent_mask, ent_len, rel_emb, rel_mask, batch["graph"]
      )
      return g_ent, g_root, title_enc, ent_enc
  
file_path: dgl/examples/pytorch/graphwriter/graphwriter.py
imports: import torch
  from modules import BiLSTM, GraphTrans, MSA
  from torch import nn
  from utlis import *
  import dgl
label_desc: Use image node_id 2 for calling the GraphWriter obj's underlying member method code with example usage: obj.enc_forward(batch, ent_mask, ent_text_mask, ent_len, rel_mask, title_mask) and returns: g_ent,  g_root,  title_enc,  ent_enc