class_docstr: TextSet wraps a set of texts with status.
class_docstr_tok: ["TextSet","wraps","a","set","of","texts","with","status","."]
docstr: Shape the sequence of indices to a fixed length.
  Need to word2idx first.
  See SequenceShaper for more details.
  
  :return: TextSet after sequence shaping.
docstr_tok: ["Shape","the","sequence","of","indices","to","a","fixed","length",".","Need","to","word2idx","first",".","See","SequenceShaper","for","more","details",".",":","return",":","TextSet","after","sequence","shaping","."]
code: def shape_sequence(self, len, trunc_mode="pre", pad_element=0):
      """
      Shape the sequence of indices to a fixed length.
      Need to word2idx first.
      See SequenceShaper for more details.
  
      :return: TextSet after sequence shaping.
      """
      assert isinstance(
          pad_element, int
      ), "pad_element should be an int"
      jvalue = callZooFunc(
          self.bigdl_type,
          "textSetShapeSequence",
          self.value,
          len,
          trunc_mode,
          pad_element,
      )
      return TextSet(jvalue=jvalue)
  
imports: import six
  from bigdl.util.common import JavaValue
  from zoo.common.utils import callZooFunc
  from pyspark import RDD
label_desc: Use image node_id 20 for calling the TextSet obj's underlying member method code with example usage: obj.shape_sequence(len, trunc_mode, pad_element) and returns: TextSet