code: def tokenize(self, sample):
      tokenized_sample = self.tokenizer(
          sample[DataKeys.INPUT],
          max_length=self.max_source_length,
          padding=self.padding,
          add_special_tokens=True,
          truncation=True,
      )
      tokenized_sample = tokenized_sample.data
      if DataKeys.TARGET in sample:
          with self.tokenizer.as_target_tokenizer():
              tokenized_sample[DataKeys.TARGET] = self.tokenizer(
                  sample[DataKeys.TARGET],
                  max_length=self.max_target_length,
                  padding=self.padding,
                  add_special_tokens=True,
                  truncation=True,
              )["input_ids"]
      return tokenized_sample
  
imports: from dataclasses import dataclass
  from typing import Union
  from flash.core.data.io.input import DataKeys
  from flash.core.integrations.transformers.collate import TransformersCollate
label_desc: Use image node_id 1 for calling the TextSeq2SeqCollate obj's underlying member method code with example usage: obj.tokenize(sample) and returns: tokenized_sample