code: def testRaggedCross(
      self,
      inputs,
      num_buckets=0,
      hash_key=None,
      expected=None,
      expected_hashed=None,
      matches_sparse_cross=True,
  ):
      ragged_cross = ragged_array_ops.cross(inputs)
      ragged_cross_hashed = ragged_array_ops.cross_hashed(
          inputs, num_buckets, hash_key
      )
  
      if expected is not None:
          self.assertAllEqual(ragged_cross, expected)
      if expected_hashed is not None:
          self.assertAllEqual(ragged_cross_hashed, expected_hashed)
  
      if matches_sparse_cross:
          # Check that ragged.cross & sparse.cross match.
          sparse_inputs = [self._ragged_to_sparse(t) for t in inputs]
          sparse_cross = sparse_ops.sparse_cross(sparse_inputs)
          self.assertAllEqual(
              ragged_cross,
              ragged_tensor.RaggedTensor.from_sparse(sparse_cross),
          )
  
          # Check that ragged.cross_hashed & sparse.cross_hashed match.
          sparse_inputs = [self._ragged_to_sparse(t) for t in inputs]
          sparse_cross_hashed = sparse_ops.sparse_cross_hashed(
              sparse_inputs, num_buckets, hash_key
          )
          self.assertAllEqual(
              ragged_cross_hashed,
              ragged_tensor.RaggedTensor.from_sparse(
                  sparse_cross_hashed
              ),
          )
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_ragged_array_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.ops.ragged import ragged_array_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 1 for calling the RaggedCrossOpTest obj's underlying member method code with example usage: obj.testRaggedCross(inputs, num_buckets, hash_key, expected, expected_hashed, matches_sparse_cross) without return types