code: def boolean_mask_sparse(a, mask, axis=0):
      """
      SparseTensor equivalent to tf.boolean_mask.
      :param a: SparseTensor of rank k and nnz non-zeros.
      :param mask: rank-1 bool Tensor.
      :param axis: int, axis on which to mask. Must be in [-k, k).
      :return masked_a: SparseTensor masked along the given axis.
      :return values_mask: bool Tensor indicating surviving values, shape [nnz].
      """
      i = tf.squeeze(tf.where(mask), axis=1)
      out_size = tf.math.count_nonzero(mask)
      in_size = a.dense_shape[axis]
      inverse_map = _indices_to_inverse_map(i, in_size)
      return _boolean_mask_sparse(
          a, mask, axis=axis, inverse_map=inverse_map, out_size=out_size
      )
  
file_path: spektral/spektral/layers/ops/sparse.py
imports: import tensorflow
  from tensorflow.python.ops import gen_sparse_ops
  from .None import ops
label_desc: Use image node_id 7 for calling a global function with example usage: boolean_mask_sparse(a, mask, axis) and returns: _boolean_mask_sparse