class_docstr: Converts source sequences to text.
class_docstr_tok: ["Converts","source","sequences","to","text","."]
docstr: :param source_seqs:
      The source sequences. *Shape:* :math:`(N,S,*)`, where :math:`N` is
      the batch size, :math:`S` is the sequence length, and :math:`*` is
      any number of sequence-specific dimensions including none.
  :param source_padding_mask:
      The padding mask of ``source_seqs``. *Shape:* :math:`(N,S)`, where
      :math:`N` is the batch size and :math:`S` is the sequence length.
  
  :returns:
      - The converted texts.
      - The output of the underlying sequence-to-sequence generator.
docstr_tok: [":","param","source_seqs",":","The","source","sequences",".","*","Shape",":","*",":","math",":","`","(","N",",","S",",","*",")","`",",","where",":","math",":","`","N","`","is","the","batch","size",",",":","math",":","`","S","`","is","the","sequence","length",",","and",":","math",":","`","*","`","is","any","number","of","sequence-specific","dimensions","including","none",".",":","param","source_padding_mask",":","The","padding","mask","of","``","source_seqs","``",".","*","Shape",":","*",":","math",":","`","(","N",",","S",")","`",",","where",":","math",":","`","N","`","is","the","batch","size","and",":","math",":","`","S","`","is","the","sequence","length",".",":","returns",":","-","The","converted","texts",".","-","The","output","of","the","underlying","sequence-to-sequence","generator","."]
code: def batch_convert(
      self,
      source_seqs: Tensor,
      source_padding_mask: Optional[PaddingMask],
  ) -> Tuple[List[StringLike], Seq2SeqGeneratorOutput]:
      """
      :param source_seqs:
          The source sequences. *Shape:* :math:`(N,S,*)`, where :math:`N` is
          the batch size, :math:`S` is the sequence length, and :math:`*` is
          any number of sequence-specific dimensions including none.
      :param source_padding_mask:
          The padding mask of ``source_seqs``. *Shape:* :math:`(N,S)`, where
          :math:`N` is the batch size and :math:`S` is the sequence length.
  
      :returns:
          - The converted texts.
          - The output of the underlying sequence-to-sequence generator.
      """
      if len(source_seqs) == 0:
          raise ValueError(
              "`source_seqs` must contain at least one element, but is empty instead."
          )
  
      return self._do_convert(source_seqs, source_padding_mask)
  
imports: from abc import ABC
  from typing import List, Optional, Sequence, Tuple, final
  from torch import Tensor
  from fairseq2.data import StringLike
  from fairseq2.data.text import TextTokenDecoder, TextTokenEncoder, TextTokenizer
  from fairseq2.generation.generator import Seq2SeqGenerator, Seq2SeqGeneratorOutput, SequenceGenerator, SequenceGeneratorOutput
  from fairseq2.nn.padding import PaddingMask, pad_seqs
  from fairseq2.nn.utils.module import infer_device
label_desc: Use image node_id 2 for calling the SequenceToTextConverter obj's underlying member method code with example usage: obj.batch_convert(source_seqs, source_padding_mask) and returns: self