code: def pre_process(self, gts, tag):
      gts, tag = gts.numpy(), tag.numpy().tolist()
      temp_gts = []
      batch = len(tag)
      for i in range(batch):
          num, recoder_len = tag[i][0], tag[i][1]
          temp_gts.append(
              paddle.to_tensor(gts[i, :num, : num + 1], dtype="int64")
          )
      return temp_gts
  
file_path: PaddleOCR/ppocr/losses/kie_sdmgr_loss.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from paddle import nn
  import paddle
label_desc: Use image node_id 2 for calling the SDMGRLoss obj's underlying member method code with example usage: obj.pre_process(gts, tag) and returns: temp_gts