code: def _test_bincount_col_count_with_weights(
      self, num_rows, num_cols, size, dtype
  ):
      np.random.seed(42)
      inp = np.random.randint(
          0, size, (num_rows, num_cols), dtype=dtype
      )
      np_weight = np.random.random((num_rows, num_cols))
      np_out = np.reshape(
          np.concatenate(
              [
                  np.bincount(
                      inp[j, :], weights=np_weight[j, :], minlength=size
                  )
                  for j in range(num_rows)
              ],
              axis=0,
          ),
          (num_rows, size),
      )
      with test_util.use_gpu():
          evaluated = self.evaluate(
              gen_math_ops.dense_bincount(
                  input=inp, weights=np_weight, size=size
              )
          )
          if np_out.dtype in (np.float32, np.float64):
              self.assertAllClose(np_out, evaluated)
          else:
              self.assertAllEqual(np_out, evaluated)
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import bincount_ops
  from tensorflow.python.ops import gen_math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 7 for calling the BincountOpTest obj's underlying member method code with example usage: obj._test_bincount_col_count_with_weights(num_rows, num_cols, size, dtype) without return types