class_docstr: A single training instance (sentence pair).
class_docstr_tok: ["A","single","training","instance","(","sentence","pair",")","."]
code: def __str__(self):
      tks = self.vocab.to_tokens(self.tokens)
      mask_tks = self.vocab.to_tokens(self.masked_lm_labels)
      s = ""
      s += "tokens: %s\n" % (" ".join(tks))
      s += "segment_ids: %s\n" % (
          " ".join([str(x) for x in self.segment_ids])
      )
      s += "is_random_next: %s\n" % self.is_random_next
      s += "masked_lm_positions: %s\n" % (
          " ".join([str(x) for x in self.masked_lm_positions])
      )
      s += "masked_lm_labels: %s\n" % (" ".join(mask_tks))
      s += "\n"
      return s
  
imports: import argparse
  import logging
  import io
  import os
  import glob
  import collections
  import warnings
  import random
  import time
  from multiprocessing import Pool
  import numpy
  from gluonnlp.models.bert import BertModel, BertForPretrain, get_pretrained_bert
  import gluonnlp
label_desc: Use image node_id 2 for calling the TrainingInstance obj's underlying member method code with example usage: obj.__str__() and returns: s