class_docstr: Lazy local mask, prevents model from attending to tokens outside window.
  
  Attributes:
    _shape: Shape of the 2-dim mask: (q_seq_len, kv_seq_len).
    window_size: Size of the two sides of the local window (None identifes no
      limit for the given side).
    offset: Offset of q start wrt kv. A positive offset shifts the bottom
      triangle upward, a negative one shifts it downward. A negative offset
      makes the first 'offset' rows of the attention matrix all 0s which leads
      to undefined softmax.
    _q_sequence: Important for performance.
class_docstr_tok: ["Lazy","local","mask",",","prevents","model","from","attending","to","tokens","outside","window",".","Attributes",":","_shape",":","Shape","of","the","2-dim","mask",":","(","q_seq_len",",","kv_seq_len",")",".","window_size",":","Size","of","the","two","sides","of","the","local","window","(","None","identifes","no","limit","for","the","given","side",")",".","offset",":","Offset","of","q","start","wrt","kv",".","A","positive","offset","shifts","the","bottom","triangle","upward",",","a","negative","one","shifts","it","downward",".","A","negative","offset","makes","the","first","'offset","'","rows","of","the","attention","matrix","all","0s","which","leads","to","undefined","softmax",".","_q_sequence",":","Important","for","performance","."]
code: def shape(self) -> Tuple[int, int]:
      return self._shape
  
imports: from __future__ import annotations
  import dataclasses
  from typing import Any, Callable, Sequence, Tuple
  import numpy
label_desc: Use image node_id 2 for calling the LocalMask obj's underlying member method code with example usage: obj.shape() and returns: self