code: def __init__(
      self,
      hidden_size,
      num_layers,
      mlp_dim,
      dropout_rate,
      num_heads,
      attention_dropout_rate,
      vis,
  ):
      super(Encoder, self).__init__()
      self.vis = vis
      self.layer = nn.LayerList()
      self.encoder_norm = nn.LayerNorm(hidden_size, epsilon=1e-6)
      for _ in range(num_layers):
          layer = Block(
              hidden_size,
              mlp_dim,
              dropout_rate,
              num_heads,
              attention_dropout_rate,
              vis,
          )
          self.layer.append(copy.deepcopy(layer))
  
imports: import copy
  import math
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from medicalseg.cvlibs import manager
  from medicalseg.utils import load_pretrained_model
label_desc: Use image node_id 1 to create a new Encoder object from inherited base classes: nn with example: obj = Encoder(hidden_size, num_layers, mlp_dim, dropout_rate, num_heads, attention_dropout_rate, vis)