    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
Torchscriptable version of `numpy.prod`. Note that `_prod([]) == 1`
python/aitemplate/frontend/nn/multiscale_attention.py