class_docstr: ### Average pool shortening
  
  This down-samples by a given factor with average pooling
docstr: * `x` is of shape `[seq_len, batch_size, d_model]`
code: def forward(self, x: torch.Tensor):
      """
      * `x` is of shape `[seq_len, batch_size, d_model]`
      """
      # Pooling layer accepts shape `[batch_size, d_model, seq_len]` so we
      # permute axes.
      return self.pool(x.permute(1, 2, 0)).permute(2, 0, 1)
  
imports: from typing import List
  import torch
  from torch import nn
  from labml_helpers.module import Module
  from labml_nn.transformers import MultiHeadAttention, TransformerLayer
  from labml_nn.transformers.feed_forward import FeedForward
  from labml_nn.transformers.utils import subsequent_mask
label_desc: Use image node_id 2 for calling the AvgPoolShortening obj's underlying member method code with example usage: obj.forward(x) and returns: self