code: def create_twin_models(model_class, config_creator=None):
      if config_creator and model_class.__name__.startswith("Auto"):
          model_config = config_creator()
          model1 = model_class.from_config(model_config)
      elif config_creator:
          model_config = config_creator()
          model1 = model_class(model_config)
      else:
          model_config = model_class.config_class()
          model1 = model_class(model_config)
      adapters.init(model1)
      model1.eval()
      # create a twin initialized with the same random weights
      model2 = copy.deepcopy(model1)
      model2.eval()
      return model1, model2
  
imports: import copy
  import os
  import tempfile
  import torch
  import adapters
  from adapters import ADAPTER_MODEL_MAPPING, AdapterSetup, AdapterTrainer, AutoAdapterModel
  from adapters.heads import CausalLMHead
  from adapters.utils import WEIGHTS_NAME
  from adapters.wrappers import load_model
  from transformers import TrainingArguments
  from transformers.testing_utils import require_torch, torch_device
label_desc: Use image node_id 1 for calling a global function with example usage: create_twin_models(model_class, config_creator) and returns: model1,  model2