code: def assertSameTypes(self, expected_prog, typed, check_dtypes=True):
      for v, type_ in six.iteritems(typed.var_defs):
          for expected_type, got_type in instructions.pattern_zip(
              expected_prog.var_defs[v].tensors,
              type_.tensors,
              leaf_type=instructions.TensorType,
          ):
              if check_dtypes:
                  if expected_type.dtype in (np.bool_, np.bool_):
                      self.assertIn(
                          got_type.dtype, (np.bool_, np.bool_)
                      )
                  else:
                      self.assertEqual(
                          expected_type.dtype, got_type.dtype
                      )
              self.assertEqual(expected_type.shape, got_type.shape)
  
imports: import functools
  from absl.testing import parameterized
  import numpy
  import six
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.auto_batching import allocation_strategy
  from tensorflow_probability.python.experimental.auto_batching import instructions
  from tensorflow_probability.python.experimental.auto_batching import lowering
  from tensorflow_probability.python.experimental.auto_batching import numpy_backend
  from tensorflow_probability.python.experimental.auto_batching import test_programs
  from tensorflow_probability.python.experimental.auto_batching import tf_backend
  from tensorflow_probability.python.experimental.auto_batching import type_inference
  from tensorflow_probability.python.experimental.auto_batching import virtual_machine
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 1 for calling the TypeInferenceTest obj's underlying member method code with example usage: obj.assertSameTypes(expected_prog, typed, check_dtypes) without return types