code: def get_text_encodings(self, input_text, repeat=1):
      # Repeat the inputs so that we generate multiple samples per query
      if isinstance(input_text, str):
          inp_text_batch = [input_text]
      else:
          inp_text_batch = input_text
      # Encode the text embeddings using text encoder.
      text_encodings, text_mask = self.text_encoder.encode(
          inp_text_batch, device=self.device
      )
      if repeat != 1:
          assert (
              len(inp_text_batch) == 1
          ), "Repeat should only be applied if we feed single text to encoder."
          text_encodings = text_encodings.repeat(repeat, 1, 1)
          text_mask = text_mask.repeat(repeat, 1)
      return text_encodings, text_mask
  
imports: import os
  import time
  from dataclasses import dataclass, field
  from typing import Callable, List, Optional, Union
  import torch
  from omegaconf.omegaconf import OmegaConf
  from pytorch_lightning import Trainer
  from torch.cuda.amp import autocast
  from nemo.collections.multimodal.models.text_to_image.imagen.imagen import Imagen, MegatronImagen
  from nemo.collections.multimodal.parts.utils import numpy_to_pil, setup_trainer_and_models_for_inference
label_desc: Use image node_id 5 for calling the ImagenPipeline obj's underlying member method code with example usage: obj.get_text_encodings(input_text, repeat) and returns: text_encodings,  text_mask