class_docstr: Multi-head self attention implement.
  
  Args:
      multiheads (int): The number of heads.
      head_dim (object): Dimention of each head.
      mask_right (boolean): whether to mask right words.
  
  Returns:
      object: Weighted sum after attention.
docstr: Compute shape of output tensor.
  
  Returns:
      tuple: output shape tuple.
docstr_tok: ["Compute","shape","of","output","tensor",".","Returns",":","tuple",":","output","shape","tuple","."]
code: def compute_output_shape(self, input_shape):
      """Compute shape of output tensor.
  
      Returns:
          tuple: output shape tuple.
      """
  
      return (input_shape[0][0], input_shape[0][1], self.output_dim)
  
imports: import tensorflow.compat.v1.keras
  from tensorflow.compat.v1.linalg import einsum
  from tensorflow.compat.v1.keras import layers
  from tensorflow.compat.v1.keras import backend
label_desc: Use image node_id 2 for calling the SelfAttention obj's underlying member method code with example usage: obj.compute_output_shape(input_shape) and returns: input_shape,  input_shape,  self