class_docstr: Special purpose Data object which assumes a single text tensorizer.  Packs
  tokens into a square batch with no padding.  Used for LM training. The object
  also takes in an optional language argument which is used for cross-lingual
  LM training.
class_docstr_tok: ["Special","purpose","Data","object","which","assumes","a","single","text","tensorizer",".","Packs","tokens","into","a","square","batch","with","no","padding",".","Used","for","LM","training",".","The","object","also","takes","in","an","optional","language","argument","which","is","used","for","cross-lingual","LM","training","."]
code: def _yield_and_reset(self, row):
      packed_tokens = list(self.remainder["tokens"])
      packed_segments = list(self.remainder["segment_labels"])
      self.remainder: Dict[str, List[int]] = {
          "tokens": [],
          "segment_labels": [],
      }
      return RowData(
          row,
          self._format_output_row(
              packed_tokens, packed_segments, len(packed_tokens)
          ),
      )
  
file_path: pytext/pytext/data/packed_lm_data.py
imports: from typing import Dict, List, Optional, Type
  from pytext.common.constants import Stage
  from pytext.data import Batcher, Data
  from pytext.data.bert_tensorizer import BERTTensorizerBase
  from pytext.data.data import RowData
  from pytext.data.sources import DataSource
  from pytext.data.tensorizers import Tensorizer, TokenTensorizer
label_desc: Use image node_id 5 for calling the PackedLMData obj's underlying member method code with example usage: obj._yield_and_reset(row) and returns: RowData