code: def test_get_windowed_attention_mask(
      N, window_size, window_shift
  ) -> None:
      mask = cvnets.modules.windowed_transformer.get_windows_shift_mask(
          N, window_size, window_shift, device=torch.device("cpu")
      )
  
      expected = torch.zeros(N // window_size, window_size, window_size)
      expected[-1].fill_(float("-inf"))
      expected[
          -1, : window_size - window_shift, : window_size - window_shift
      ] = 0
      expected[-1, -window_shift:, -window_shift:] = 0
  
      assert torch.all(mask == expected)
  
imports: import pytest
  import torch
  import cvnets.modules
  from cvnets.modules import WindowedTransformerEncoder
  from tests.modules.test_transformer import ensure_equal_in_range, get_opts
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_windowed_attention_mask(N, window_size, window_shift) without return types