class_docstr: ## Compressive Transformer Layer
  
  This is the implementation of a single compressive transformer layer
docstr: Concatenate the normalized token embeddings with memory and compressed memory.
  
  * `z` is layer normalized token embeddings.
  * `mem` and `c_mem` are memory and compressed memory (not normalized).
docstr_tok: ["Concatenate","the","normalized","token","embeddings","with","memory","and","compressed","memory",".","*","`","z","`","is","layer","normalized","token","embeddings",".","*","`","mem","`","and","`","c_mem","`","are","memory","and","compressed","memory","(","not","normalized",")","."]
code: def concat_memory(
      self,
      z: torch.Tensor,
      mem: Optional[torch.Tensor],
      c_mem: Optional[torch.Tensor],
  ):
      """
      Concatenate the normalized token embeddings with memory and compressed memory.
  
      * `z` is layer normalized token embeddings.
      * `mem` and `c_mem` are memory and compressed memory (not normalized).
      """
  
      # If there is no memory just return the token embeddings
      if mem is None:
          return z
  
      # If there are compressed memory concatenate that with memory
      if c_mem is not None:
          mem = torch.cat((c_mem, mem), dim=0)
  
      # Run the memory through the normalization layer
      mem = self.norm_self_attn(mem)
      # Concatenate normalized memory and normalized token embeddings
      return torch.cat((mem, z), dim=0)
  
imports: from typing import Optional, List
  import torch
  import torch.nn.functional
  from torch import nn
  from labml_helpers.module import Module, TypedModuleList
  from labml_nn.transformers.feed_forward import FeedForward
  from labml_nn.transformers.mha import PrepareForMultiHeadAttention
  from labml_nn.transformers.xl.relative_mha import RelativeMultiHeadAttention
  from labml_nn.utils import clone_module_list
label_desc: Use image node_id 2 for calling the CompressiveTransformerLayer obj's underlying member method code with example usage: obj.concat_memory(z, mem, c_mem) and returns: torch, z