code: def testRaggedDispatch(
      self,
      op,
      expected,
      args=(),
      result_is_list=False,
      rtol=None,
      kwargs=None,
  ):
      # For some tests, the inputs/outputs to the function need to be
      # constructed late, because they contain tensors.
      if callable(kwargs):
          kwargs = kwargs()
      if callable(args):
          args = args()
      if callable(expected):
          expected = expected()
  
      kwargs = kwargs or {}
      if rtol is not None:
          assert_fn = lambda x, y: self.assertAllClose(x, y, rtol=rtol)
      else:
          assert_fn = self.assertAllEqual
  
      result = op(*args, **kwargs)
      if isinstance(expected, DynamicRaggedShape):
          self.assertDynamicRaggedShapeEqual(expected, result)
      elif result_is_list:
          self.assertLen(result, len(expected))
          for r, e in zip(result, expected):
              assert_fn(r, e)
      else:
          assert_fn(result, expected)
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python import tf2
  from tensorflow.python.eager import context
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import random_seed
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import clip_ops
  from tensorflow.python.ops import data_flow_ops
  from tensorflow.python.ops import image_ops_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_impl
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import string_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.ops.ragged import ragged_dispatch
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.ops.ragged import ragged_tensor_test_ops
  from tensorflow.python.ops.ragged.dynamic_ragged_shape import DynamicRaggedShape
  from tensorflow.python.platform import googletest
  from tensorflow.python.util import dispatch
  from tensorflow.python.util import nest
label_desc: Use image node_id 12 for calling the RaggedDispatchTest obj's underlying member method code with example usage: obj.testRaggedDispatch(op, expected, args, result_is_list, rtol, kwargs) without return types