code: def forward(self, x: Tensor) -> Tensor:
      batch_size, chans, num_y, num_x = x.shape
      h_ = self.norm(x).view(batch_size, chans, -1).permute(0, 2, 1)
      h_ = self.xca(h_)
      h_ = h_.permute(0, 2, 1).reshape(batch_size, chans, num_y, num_x)
  
      return x + h_
  
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 2 for calling the _AttnBlock obj's underlying member method code with example usage: obj.forward(x) and returns: unknown