class_docstr: Whole utterance augmented memory transformer.
  
  This is not pyspeech nn layer. It is used as a module in a master layer where
  multiple transformers is used.
class_docstr_tok: ["Whole","utterance","augmented","memory","transformer",".","This","is","not","pyspeech","nn","layer",".","It","is","used","as","a","module","in","a","master","layer","where","multiple","transformers","is","used","."]
code: def pre_attention_ops(self, input, right_context_blocks):
      rc_length = right_context_blocks.size(0)
      input_length = input.size(0)
  
      rc_and_input = torch.cat([right_context_blocks, input], dim=0)
      residual_input = rc_and_input
      rc_and_input = self.layer_norm_pre(rc_and_input)
  
      query_input = rc_and_input[-input_length:, :, :]
      return (
          rc_length,
          input_length,
          residual_input,
          query_input,
          rc_and_input,
      )
  
imports: import math
  import re
  from functools import partial
  from typing import List, Optional, Tuple
  import torch
  import torch.nn
  from torch import Tensor
  from torch import device
  from fairseq.models import FairseqEncoder
  from fairseq.models.speech_to_text.utils import NoOp, attention_suppression, layer_norm_backward_hook, lengths_to_padding_mask, segments_to_sequence
label_desc: Use image node_id 4 for calling the NoSegAugmentedMemoryTransformer obj's underlying member method code with example usage: obj.pre_attention_ops(input, right_context_blocks) and returns: rc_length,  input_length,  residual_input,  query_input,  rc_and_input