code: def assert_model_sparsity_m_by_n(test_case, model, m_by_n=(2, 4)):
      for layer in model.layers:
          if isinstance(layer, pruning_wrapper.PruneLowMagnitude):
              for weight in layer.layer.get_prunable_weights():
                  test_case.assertTrue(
                      pruning_utils.is_pruned_m_by_n(
                          weight, m_by_n=m_by_n
                      )
                  )
  
file_path: model-optimization/tensorflow_model_optimization/python/core/sparsity/keras/test_utils.py
imports: import tempfile
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.sparsity.keras import prune
  from tensorflow_model_optimization.python.core.sparsity.keras import pruning_utils
  from tensorflow_model_optimization.python.core.sparsity.keras import pruning_wrapper
label_desc: Use image node_id 14 for calling a global function with example usage: assert_model_sparsity_m_by_n(test_case, model, m_by_n) without return types