code: def test_boolean_mask_sparse_square():
      st = random_sparse((5, 5), 15)
      dense = tf.sparse.to_dense(st)
      mask = np.array([0, 1, 0, 1, 1], dtype=bool)
      actual, _ = ops.boolean_mask_sparse_square(st, mask)
      for axis in (0, 1):
          dense = tf.boolean_mask(dense, mask, axis=axis)
      actual = tf.sparse.to_dense(actual)
      np.testing.assert_equal(actual.numpy(), dense.numpy())
  
imports: import numpy
  import scipy.sparse
  import tensorflow
  from spektral.data.utils import to_disjoint
  from spektral.layers import ops
  from spektral.utils import convolution
  from spektral.utils.sparse import sp_batch_to_sp_tensor, sp_matrix_to_sp_tensor
label_desc: Use image node_id 20 for calling a global function with example usage: test_boolean_mask_sparse_square() without return types