code: def get_ht(self, rel_enco, hts):
      htss = []
      for i in range(len(hts)):
          ht_index = hts[i]
          for h_index, t_index in ht_index:
              htss.append(rel_enco[i, h_index, t_index])
      htss = torch.stack(htss, dim=0)
      return htss
  
file_path: DeepKE/src/deepke/relation_extraction/document/model.py
imports: import torch
  import torch.nn
  from opt_einsum import contract
  from .losses import ATLoss
  import torch.nn.functional
  from .module import AttentionUNet
  from .prepro import process_long_input
label_desc: Use image node_id 5 for calling the DocREModel obj's underlying member method code with example usage: obj.get_ht(rel_enco, hts) and returns: htss