code: def __init__(
      self,
      in_channels: int,
      resolution_level: Optional[int] = None,
      norm_type: str = "group",
  ):
      super().__init__()
      self.in_channels = in_channels
      self.resolution_level = resolution_level
  
      self.norm = create_norm(in_channels, norm_type=norm_type)
      self.xca = XCA(dim=in_channels, num_heads=1, qkv_bias=True)
  
imports: import logging
  from typing import Optional, Sequence
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from neuralcompression.layers import XCA, ChannelNorm2D
  from .._outputs._vqvae_autoencoder_output import VqVaeAutoencoderOutput
label_desc: Use image node_id 1 to create a new _AttnBlock object from inherited base classes: nn with example: obj = _AttnBlock(in_channels, resolution_level, norm_type)