code: def run_embeddings_text(
      encoder, decoder, tokenizer, prompt, max_context_length=512
  ):
      """Utility function to get the embeddings of a given text prompt
      Args:
          encoder: inference session to use for the encoder
          decoder: inference session to use for the decoder
          tokenizer: huggingface tokenizer to tokenize the inputs
          prompt: str to run
          max_context_length: maximum number of tokens to use as context
  
      """
      input_ids = tokenizer.encode(prompt, return_tensors="pt").numpy()[
          :max_context_length
      ]
  
      # To generate the encoder's last hidden state
      encoder_output = encoder.run(None, {"input_ids": input_ids})[0]
      # To generate the full model's embeddings
      decoder_output = decoder.run(
          None,
          {
              "input_ids": input_ids,
              "encoder_hidden_states": encoder_output,
          },
      )[0]
  
      return encoder_output, decoder_output
  
file_path: onnxt5/onnxt5/api.py
imports: from pathlib import Path
  import tarfile
  import os
  import glob
  import requests
  from onnxruntime import InferenceSession
  from tqdm import tqdm
  from transformers import T5Tokenizer
label_desc: Use image node_id 4 for calling a global function with example usage: run_embeddings_text(encoder, decoder, tokenizer, prompt, max_context_length) and returns: encoder_output,  decoder_output