code: def create_bert_model():
      hidden_size = 384
      num_layers = 2
      heads = 12
      dropout_ratio = 0.1
      bert_config = BertConfig(
          vocab_size_or_config_json_file=119547,
          hidden_size=hidden_size,
          num_hidden_layers=num_layers,
          num_attention_heads=heads,
          intermediate_size=hidden_size * 4,
          hidden_act="gelu",
          hidden_dropout_prob=dropout_ratio,
          attention_probs_dropout_prob=dropout_ratio,
          max_position_embeddings=512,
          type_vocab_size=2,
          initializer_range=0.2,
      )
  
      weights = []
      biases = []
  
      for i in range(4):
          weights.append(
              torch.nn.Parameter(torch.Tensor(hidden_size, hidden_size))
          )
  
      weights.append(torch.nn.Parameter(torch.Tensor(hidden_size)))
      weights.append(
          torch.nn.Parameter(torch.Tensor(hidden_size * 4, hidden_size))
      )
      weights.append(
          torch.nn.Parameter(torch.Tensor(hidden_size, hidden_size * 4))
      )
      weights.append(torch.nn.Parameter(torch.Tensor(hidden_size)))
  
      biases.append(torch.nn.Parameter(torch.Tensor(hidden_size)))
      for i in range(4):
          biases.append(torch.nn.Parameter(torch.Tensor(hidden_size)))
      biases.append(torch.nn.Parameter(torch.Tensor(hidden_size * 4)))
      biases.append(torch.nn.Parameter(torch.Tensor(hidden_size)))
      biases.append(torch.nn.Parameter(torch.Tensor(hidden_size)))
  
      return BertEncoderPreln(bert_config, weights, biases)
  
imports: import torch
  import pytest
  import random
  import numpy
  from unit.megatron_model import get_gpt2_model
  from deepspeed.compression.compress import init_compression
  from unit.modeling import BertConfig
  from unit.modelingpreln import BertEncoder
  from deepspeed.compression.basic_layer import LinearLayer_Compress, ColumnParallelLinear_Compress, RowParallelLinear_Compress
  from deepspeed.compression.helper import convert_conv1d_to_linear
  from deepspeed.accelerator import get_accelerator
  from deepspeed.runtime.utils import required_torch_version
  from unit.common import DistributedTest
label_desc: Use image node_id 2 for calling a global function with example usage: create_bert_model() and returns: BertEncoderPreln