code: def testUnion(self):
      rt_checker = dispatch.MakeInstanceChecker(
          ragged_tensor.RaggedTensor
      )
      tensor_checker = dispatch.MakeInstanceChecker(tensor.Tensor)
      rt_or_tensor = dispatch.MakeUnionChecker(
          [rt_checker, tensor_checker]
      )
      checker = dispatch.PySignatureChecker(
          [(0, rt_or_tensor), (1, rt_or_tensor)]
      )
  
      t = constant_op.constant([[1, 2], [3, 4]])
      rt = ragged_factory_ops.constant([[1, 2], [3]])
  
      self.check_signatures(
          checker,
          [
              ((t, t), False),
              ((t, rt), True),
              ((rt, t), True),
              ((rt, rt), True),
              ((rt, [rt]), False),
              ((rt, rt, 1, 2, None), True),
          ],
      )  # pyformat: disable
  
      self.assertEqual(
          repr(checker),
          "<PySignatureChecker args[0]:Union[RaggedTensor, Tensor], "
          "args[1]:Union[RaggedTensor, Tensor]>",
      )
  
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 3 for calling the PythonSignatureCheckerTest obj's underlying member method code with example usage: obj.testUnion() without return types