code: def testMultipleDispatchers(self):
      dispatcher = dispatch.PythonAPIDispatcher(
          "tf.foo", ["x", "y", "name"], (None,)
      )
  
      rt_checker = dispatch.MakeInstanceChecker(
          ragged_tensor.RaggedTensor
      )
      rt_x_checker = dispatch.PySignatureChecker([(0, rt_checker)])
      rt_y_checker = dispatch.PySignatureChecker([(1, rt_checker)])
  
      f1 = lambda x, y, name=None: "f1"
      f2 = lambda x, y, name=None: "f2"
  
      rt = ragged_factory_ops.constant([[1, 2], [3]])
  
      dispatcher.Register(rt_x_checker, f1)
      dispatcher.Register(rt_y_checker, f2)
  
      self.assertEqual(dispatcher.Dispatch((rt, 5), None), "f1")
      self.assertEqual(dispatcher.Dispatch(("foo", rt), None), "f2")
      self.assertEqual(dispatcher.Dispatch(("foo",), {"y": rt}), "f2")
      self.assertEqual(
          dispatcher.Dispatch(("foo", "bar"), None), NotImplemented
      )
      with self.assertRaisesRegex(
          ValueError,
          "Multiple dispatch targets .*"
          r"match the arguments to tf\.foo",
      ):
          dispatcher.Dispatch((rt, rt), None)
  
imports: import collections
  import numpy
  from tensorflow.python.framework import _pywrap_python_api_dispatcher
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import test_util
  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 2 for calling the PythonAPIDispatcherTest obj's underlying member method code with example usage: obj.testMultipleDispatchers() without return types