code: def create_t5_encoder_decoder(pretrained_version="t5-base"):
      """Generates an encoder and a decoder model with a language model head from a pretrained huggingface model
  
      Args:
          pretrained_version (str): Name of a pretrained model, or path to a pretrained / finetuned version of T5
  
      Returns:
          simplified_encoder: pytorch t5 encoder with a wrapper to output only the hidden states
          decoder_with_lm_head: pytorch t5 decoder with a language modeling head
      """
  
      if "mt5" in pretrained_version:
          model = MT5ForConditionalGeneration.from_pretrained(
              pretrained_version, use_auth_token=get_auth_token()
          )
      else:
          model = T5ForConditionalGeneration.from_pretrained(
              pretrained_version, use_auth_token=get_auth_token()
          )
  
      return turn_model_into_encoder_decoder(model)
  
file_path: fastT5/fastT5/onnx_exporter.py
imports: from .huggingface_utils import get_auth_token
  from .onnx_models_structure import T5Encoder, DecoderWithLMhead, DecoderWithLMheadInitial
  from transformers import AutoConfig, T5ForConditionalGeneration, MT5ForConditionalGeneration
  import torch
  import functools
  import operator
  from progress.bar import Bar
  from pathlib import Path
  import os
label_desc: Use image node_id 1 for calling a global function with example usage: create_t5_encoder_decoder(pretrained_version) and returns: turn_model_into_encoder_decoder