class_docstr: ## Cache
  
  This maintains a key-value cache and queues push values and pop them in the same order.
  The queues are useful since we have multiple attention layers.
class_docstr_tok: ["#","#","Cache","This","maintains","a","key-value","cache","and","queues","push","values","and","pop","them","in","the","same","order",".","The","queues","are","useful","since","we","have","multiple","attention","layers","."]
docstr: ### Return the size of the queue
  
  :param name: is the name of the queue
  :return: size of the queue if exists else None
docstr_tok: ["#","#","#","Return","the","size","of","the","queue",":","param","name",":","is","the","name","of","the","queue",":","return",":","size","of","the","queue","if","exists","else","None"]
code: def q_size(self, name):
      """
      ### Return the size of the queue
  
      :param name: is the name of the queue
      :return: size of the queue if exists else None
      """
  
      if name not in self._cache:
          return None
  
      if type(self._cache[name]) != list:
          return None
  
      return len(self._cache[name])
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/neox/utils/cache.py
imports: from typing import Any
label_desc: Use image node_id 4 for calling the Cache obj's underlying member method code with example usage: obj.q_size(name) and returns: len, None, None