code: def compute_text_embeddings(self, prompt):
      logger.info(f"Computing text embeddings for prompt: {prompt}")
      with torch.no_grad():
          prompt_embeds, pooled_prompt_embeds = utils.encode_prompt_xl(
              self.text_encoders, self.tokenizers, prompt
          )
          prompt_embeds = prompt_embeds.to(self.accelerator.device)
          pooled_prompt_embeds = pooled_prompt_embeds.to(
              self.accelerator.device
          )
      return prompt_embeds, pooled_prompt_embeds
  
imports: import itertools
  import math
  import os
  import shutil
  import torch
  import torch.nn.functional
  from diffusers import StableDiffusionXLPipeline
  from diffusers.loaders import LoraLoaderMixin, text_encoder_lora_state_dict
  from diffusers.optimization import get_scheduler
  from huggingface_hub import create_repo, upload_folder
  from tqdm import tqdm
  from autotrain import logger
  from autotrain.trainers.dreambooth import utils
label_desc: Use image node_id 2 for calling the Trainer obj's underlying member method code with example usage: obj.compute_text_embeddings(prompt) and returns: prompt_embeds,  pooled_prompt_embeds