code: def __init__(self, prefix, config, weights):
      super().__init__()
      self.embed_dim = config.hidden_size
      self.self_attn = IdeficsVisionAttention(
          prefix=f"{prefix}.self_attn", config=config, weights=weights
      )
      self.layer_norm1 = nn.LayerNorm.load(
          prefix=f"{prefix}.layer_norm1",
          weights=weights,
          eps=config.layer_norm_eps,
      )
      self.mlp = IdeficsVisionMLP(
          prefix=f"{prefix}.mlp", config=config, weights=weights
      )
      self.layer_norm2 = nn.LayerNorm.load(
          prefix=f"{prefix}.layer_norm2",
          weights=weights,
          eps=config.layer_norm_eps,
      )
  
imports: from dataclasses import dataclass
  from typing import Optional, Tuple, Union
  import torch
  import torch.utils.checkpoint
  from torch import nn
  from transformers.activations import ACT2FN
  from transformers.modeling_outputs import BaseModelOutput, BaseModelOutputWithPooling
  from transformers.utils import ModelOutput, logging
  from text_generation_server.utils.layers import TensorParallelColumnLinear, TensorParallelRowLinear, TensorParallelEmbedding
label_desc: Use image node_id 1 to create a new IdeficsVisionEncoderLayer object from inherited base classes: nn with example: obj = IdeficsVisionEncoderLayer(prefix, config, weights)