class_docstr: Multi-head attention with relative positional encoding.
  This concept was proposed in the "Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context"
  Args:
      d_model (int): The dimension of model
      num_heads (int): The number of attention heads.
  Inputs: query, key, value, pos_embedding, mask
      - **query** (batch, time, dim): Tensor containing query vector
      - **key** (batch, time, dim): Tensor containing key vector
      - **value** (batch, time, dim): Tensor containing value vector
      - **pos_embedding** (batch, time, dim): Positional embedding tensor
      - **mask** (batch, 1, time2) or (batch, time1, time2): Tensor containing indices to be masked
  Returns:
      - **outputs**: Tensor produces by relative multi head attention module.
code: def forward(
      self,
      query: torch.Tensor,
      key: torch.Tensor,
      value: torch.Tensor,
      pos_embedding: torch.Tensor,
      mask: torch.Tensor,
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      batch_size = query.shape[0]
      query = self.query_proj(query).view(
          batch_size, -1, self.num_heads, self.d_head
      )
      key = (
          self.key_proj(key)
          .view(batch_size, -1, self.num_heads, self.d_head)
          .permute(0, 2, 1, 3)
      )
      value = (
          self.value_proj(value)
          .view(batch_size, -1, self.num_heads, self.d_head)
          .permute(0, 2, 1, 3)
      )
      pos_embedding = self.pos_proj(pos_embedding).view(
          batch_size, -1, self.num_heads, self.d_head
      )
      u_bias = self.u_bias.expand_as(query)
      v_bias = self.v_bias.expand_as(query)
      a = (query + u_bias).transpose(1, 2)
      content_score = a @ key.transpose(2, 3)
      b = (query + v_bias).transpose(1, 2)
      pos_score = b @ pos_embedding.permute(0, 2, 3, 1)
      pos_score = self._relative_shift(pos_score)
  
      score = content_score + pos_score
      score = score * (1.0 / self.sqrt_dim)
  
      score.masked_fill_(mask, -1e9)
  
      attn = F.softmax(score, -1)
  
      context = (attn @ value).transpose(1, 2)
      context = context.contiguous().view(batch_size, -1, self.d_model)
  
      return self.out_proj(context), attn
  
imports: import math
  from typing import Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from TTS.tts.layers.delightful_tts.conv_layers import Conv1dGLU, DepthWiseConv1d, PointwiseConv1d
  from TTS.tts.layers.delightful_tts.networks import GLUActivation
label_desc: Use image node_id 2 for calling the RelativeMultiHeadAttention obj's underlying member method code with example usage: obj.forward(query, key, value, pos_embedding, mask) and returns: self,  attn