code: def _get_memory_states(
      self, encoder_states, encoder_mems_list=None, i=0
  ):
      if encoder_mems_list is not None:
          memory_states = torch.cat(
              (encoder_mems_list[i], encoder_states), dim=1
          )
      else:
          memory_states = encoder_states
      return memory_states
  
file_path: NeMo/nemo/collections/asr/modules/transformer/transformer_encoders.py
imports: import copy
  import torch
  import torch.nn
  from nemo.collections.asr.modules.transformer.transformer_modules import MultiHeadAttention, PositionWiseFF
  from nemo.collections.common.parts import form_attention_mask
label_desc: Use image node_id 2 for calling the TransformerEncoder obj's underlying member method code with example usage: obj._get_memory_states(encoder_states, encoder_mems_list, i) and returns: memory_states