class_docstr: An implementation of the spatial-temporal attention block, with spatial attention and temporal attention
  followed by gated fusion. For details see this paper: `"GMAN: A Graph Multi-Attention Network for Traffic Prediction."
  <https://arxiv.org/pdf/1911.08415.pdf>`_
  
  Args:
      K (int) : Number of attention heads.
      d (int) : Dimension of each attention head outputs.
      bn_decay (float): Batch normalization momentum.
      mask (bool): Whether to mask attention score in temporal attention.
code: def __init__(self, K: int, d: int, bn_decay: float, mask: bool):
      super(SpatioTemporalAttention, self).__init__()
      self._spatial_attention = SpatialAttention(K, d, bn_decay)
      self._temporal_attention = TemporalAttention(
          K, d, bn_decay, mask=mask
      )
      self._gated_fusion = GatedFusion(K * d, bn_decay)
  
imports: import math
  from typing import Union, Callable, Optional
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new SpatioTemporalAttention object from inherited base classes: nn with example: obj = SpatioTemporalAttention(K, d, bn_decay, mask)