class_docstr: Implementation of a multiscale attention block. Compare to a conventional attention
  block, a multiscale attention block optionally supports pooling (either
  before or after qkv projection). If pooling is not used, a multiscale attention
  block is equivalent to a conventional attention block.
  
  ::
                                 Input
                                   |
                  |----------------|-----------------|
                  ↓                ↓                 ↓
                Linear           Linear            Linear
             [dim expand]     [dim expand]      [dim expand]
                  &                &                 &
               Pool (Q)         Pool (K)          Pool (V)
                  → -------------- ←                 |
                           ↓                         |
                     MatMul & Scale                  |
                           ↓                         |
                        Softmax                      |
                           → ----------------------- ←
                                       ↓
                                 MatMul & Scale
                                       ↓
                                    DropOut
docstr: Torchscriptable version of `numpy.prod`. Note that `_prod([]) == 1`
docstr_tok: ["Torchscriptable","version","of","`","numpy.prod","`",".","Note","that","`","_prod","(","[","]",")","==","1","`"]
code: def _prod(self, shape: List[int]) -> int:
      """Torchscriptable version of `numpy.prod`. Note that `_prod([]) == 1`"""
      p: int = 1
      for dim in shape:
          p *= dim
      return p
  
imports: from typing import Callable, List, Optional, Tuple
  import numpy
  import torch
  import torch.nn
  from torch.nn.common_types import _size_3_t
  from .drop_path import DropPath
label_desc: Use image node_id 5 for calling the MultiScaleAttention obj's underlying member method code with example usage: obj._prod(shape) and returns: p