code: def flatten_label(self, target):
      label_flatten = []
      label_length = []
      for i in range(0, target.shape[0]):
          cur_label = target[i].tolist()
          label_flatten += cur_label[: cur_label.index(0) + 1]
          label_length.append(cur_label.index(0) + 1)
      label_flatten = paddle.to_tensor(label_flatten, dtype="int64")
      label_length = paddle.to_tensor(label_length, dtype="int32")
      return (label_flatten, label_length)
  
file_path: PaddleOCR/ppocr/losses/rec_vl_loss.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from paddle import nn
label_desc: Use image node_id 2 for calling the VLLoss obj's underlying member method code with example usage: obj.flatten_label(target) and returns: label_flatten,  label_length