code: def test_local_1d_pattern(attn_size, window_size):
      mask = AP.local_1d_pattern(attn_size, window_size).float()
      mask_ref = _local_1d_pattern(attn_size, window_size).float()
      assert torch.allclose(mask, mask_ref)
  
imports: import itertools
  import pytest
  import torch
  import xformers.components.attention.attention_patterns
  from xformers.components.attention.sparsity_config import BigBirdSparsityConfig, BSLongformerSparsityConfig, DenseSparsityConfig, FixedSparsityConfig, VariableSparsityConfig
label_desc: Use image node_id 7 for calling a global function with example usage: test_local_1d_pattern(attn_size, window_size) without return types