code: def pre_attention(self, segment, query_antecedent, memory_antecedent, bias):
      
      del segment
      return None, query_antecedent, memory_antecedent, bias
docs: Called prior to self-attention, to incorporate memory items.
  
      Args:
        segment: an integer Tensor with shape [batch]
        query_antecedent: a Tensor with shape [batch, length_q, channels]
        memory_antecedent: must be None. Attention normally allows this to be a
          Tensor with shape [batch, length_m, channels], but we currently only
          support memory for decoder-side self-attention.
        bias: bias Tensor (see attention_bias())
      Returns:
        (data, new_query_antecedent, new_memory_antecedent, new_bias)