class_docstr: Tests the correctness of the Y = Restructure({nested}) transformation.
class_docstr_tok: ["Tests","the","correctness","of","the","Y","=","Restructure","(","{","nested","}",")","transformation","."]
code: def testEventNdims(self):
      bij = restructure.Restructure(
          input_structure={"foo": [0, 1], "bar": 2, "baz": (3, 4)},
          output_structure={"zip": [1, 2, 3], "zap": 0, "zop": 4},
      )
  
      x_ndims = {"foo": [10, 11], "bar": 12, "baz": (13, 14)}
      y_ndims = {"zip": [11, 12, 13], "zap": 10, "zop": 14}
  
      self.assertAllEqualNested(
          y_ndims, bij.forward_event_ndims(x_ndims), check_types=True
      )
      self.assertAllEqualNested(
          x_ndims, bij.inverse_event_ndims(y_ndims), check_types=True
      )
  
file_path: probability/tensorflow_probability/python/bijectors/restructure_test.py
imports: import collections
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import restructure
  from tensorflow_probability.python.distributions import joint_distribution_named
  from tensorflow_probability.python.distributions import joint_distribution_sequential
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 5 for calling the RestructureBijectorTest obj's underlying member method code with example usage: obj.testEventNdims() without return types