code: def test_sparse_input(
      self,
      x,
      expected_indices,
      expected_values,
      expected_shape,
      maxlength=None,
      minlength=None,
      binary_output=False,
      weights=None,
      axis=-1,
  ):
      x_sparse = sparse_ops.from_dense(x)
      w_sparse = (
          sparse_ops.from_dense(weights)
          if weights is not None
          else None
      )
      y = sparse_ops.sparse_bincount(
          x_sparse,
          weights=w_sparse,
          minlength=minlength,
          maxlength=maxlength,
          binary_output=binary_output,
          axis=axis,
      )
      self.assertAllEqual(expected_indices, y.indices)
      self.assertAllEqual(expected_values, y.values)
      self.assertAllEqual(expected_shape, y.dense_shape)
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.eager import context
  from tensorflow.python.framework import config
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the TestSparseCount obj's underlying member method code with example usage: obj.test_sparse_input(x, expected_indices, expected_values, expected_shape, maxlength, minlength, binary_output, weights, axis) without return types