code: def test_big_bird_sparsity_config():
      sc = BigBirdSparsityConfig(
          num_heads=1,
          block_size=16,
          num_random_blocks=2,
          num_sliding_window_blocks=1,
          num_global_blocks=1,
      )
      with pytest.raises(expected_exception=ValueError):
          sc.make_layout(seq_len=16)
      sc = BigBirdSparsityConfig(
          num_heads=1,
          block_size=16,
          num_random_blocks=1,
          num_sliding_window_blocks=2,
          num_global_blocks=1,
      )
      with pytest.raises(expected_exception=ValueError):
          sc.make_layout(seq_len=16)
      sc = BigBirdSparsityConfig(
          num_heads=1,
          block_size=16,
          num_random_blocks=1,
          num_sliding_window_blocks=1,
          num_global_blocks=2,
      )
      with pytest.raises(expected_exception=ValueError):
          sc.make_layout(seq_len=16)
      with pytest.raises(expected_exception=NotImplementedError):
          BigBirdSparsityConfig(num_heads=1, attention="directional")
  
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 19 for calling a global function with example usage: test_big_bird_sparsity_config() without return types