class_docstr: TODO: implement forward_attention
  TODO: location sensitive attention
  TODO: implement attention windowing 
class_docstr_tok: ["TODO",":","implement","forward_attention","TODO",":","location","sensitive","attention","TODO",":","implement","attention","windowing"]
docstr: shapes:
      query: B x D
docstr_tok: ["shapes",":","query",":","B","x","D"]
code: def call(self, query, states):
      """
      shapes:
          query: B x D
      """
      if self.use_loc_attn:
          score, _ = self.get_loc_attn(query, states)
      else:
          score, _ = self.get_attn(query)
  
      # TODO: masking
      # if mask is not None:
      # self.apply_score_masking(score, mask)
      # attn_weights shape == (batch_size, max_length, 1)
  
      # normalize attention scores
      scores_norm = self.norm_func(score)
      attn_weights = scores_norm
  
      # apply forward attention
      new_alpha = None
      if self.use_forward_attn:
          new_alpha = self.apply_forward_attention(
              attn_weights, states[-1]
          )
          attn_weights = new_alpha
  
      # update states tuple
      # states = (cum_attn_weights, attn_weights, new_alpha)
      states = self.update_states(
          states, scores_norm, attn_weights, new_alpha
      )
  
      # context_vector shape after sum == (batch_size, hidden_size)
      context_vector = tf.matmul(
          tf.expand_dims(attn_weights, axis=2),
          self.values,
          transpose_a=True,
          transpose_b=False,
      )
      context_vector = tf.squeeze(context_vector, axis=1)
      return context_vector, attn_weights, states
  
imports: import tensorflow
  from tensorflow import keras
  from tensorflow.python.ops import math_ops
label_desc: Use image node_id 9 for calling the Attention obj's underlying member method code with example usage: obj.call(query, states) and returns: context_vector,  attn_weights,  states