class_docstr: Base, abstract class for all caches. The actual data structure is specific to each subclass.
class_docstr_tok: ["Base",",","abstract","class","for","all","caches",".","The","actual","data","structure","is","specific","to","each","subclass","."]
docstr: Returns the maximum sequence length of the cached states, if there is any.
docstr_tok: ["Returns","the","maximum","sequence","length","of","the","cached","states",",","if","there","is","any","."]
code: def get_max_length(self) -> Optional[int]:
      """Returns the maximum sequence length of the cached states, if there is any."""
      raise NotImplementedError(
          "Make sure to implement `get_max_length` in a subclass."
      )
  
imports: from typing import Any, Dict, List, Optional, Tuple
  import torch
label_desc: Use image node_id 3 for calling the Cache obj's underlying member method code with example usage: obj.get_max_length() without return types