code: def _prep_inference_labels(self, generated_texts, device):
      encoded_output_dict = self.tokenizer.tokenizer(
          generated_texts,
          truncation=True,
          max_length=self._cfg.dataset.max_answer_length,
          padding="max_length",
          return_tensors="pt",
      )
      input_ids = encoded_output_dict["input_ids"].to(device)
      labels = torch.squeeze(input_ids)
      labels[labels == self.tokenizer.tokenizer.pad_token_id] = -100
      if len(labels.shape) == 1:
          labels = torch.unsqueeze(labels, 0)
      labels = labels.to(device)
  
      return labels
  
imports: import collections
  from typing import List, Optional
  import torch
  from omegaconf import DictConfig, OmegaConf, open_dict
  from pytorch_lightning import Trainer
  from torch.cuda.amp import autocast
  from transformers import AutoModelForSeq2SeqLM
  from nemo.collections.nlp.data.question_answering.data_processor.qa_processing import QAProcessor
  from nemo.collections.nlp.data.question_answering.dataset.qa_s2s_dataset import S2SQADataset
  from nemo.collections.nlp.metrics.qa_metrics import QAMetrics
  from nemo.collections.nlp.models.language_modeling.megatron_t5_model import MegatronT5Model
  from nemo.collections.nlp.models.question_answering.qa_base_model import BaseQAModel
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.utils import logging
label_desc: Use image node_id 13 for calling the S2SQAModel obj's underlying member method code with example usage: obj._prep_inference_labels(generated_texts, device) and returns: labels