code: def _check_op(
      op,
      numpy_inputs,
      expected_output,
      convert_to_sparse=None,
      **kwargs,
  ):
      output = _check_op_dense(op, numpy_inputs, **kwargs)
      _assert_all_close(output, expected_output)
  
      if convert_to_sparse:
          if isinstance(convert_to_sparse, list):
              if isinstance(convert_to_sparse[0], bool):
                  # Make it into a list of list, always
                  convert_to_sparse = [convert_to_sparse]
  
          for c_t_s in convert_to_sparse:
              output = _check_op_sparse(
                  op, numpy_inputs, c_t_s, **kwargs
              )
              _assert_all_close(output, expected_output)
  
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 4 for calling a global function with example usage: _check_op(op, numpy_inputs, expected_output, convert_to_sparse) without return types