code: def test_dense_sparsity_config():
      sc = DenseSparsityConfig(num_heads=1, block_size=16)
      with pytest.raises(expected_exception=ValueError):
          sc.setup_layout(seq_len=17)
      assert torch.allclose(
          sc.make_layout(seq_len=32),
          torch.Tensor([[[1, 1], [1, 1]]]).long(),
      )
  
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 18 for calling a global function with example usage: test_dense_sparsity_config() without return types