code: def testHierarchicalTiling(self, physical_shape, spec):
      hierarchical_tiling = mtf.simd_mesh_impl.HierarchicalTiling(
          spec, physical_shape
      )
      mesh_shape = hierarchical_tiling.mesh_shape
      logical_to_physical = hierarchical_tiling.logical_to_physical
      num_cores = (
          physical_shape[0] * physical_shape[1] * physical_shape[2]
      )
      expected_mesh_shape = (
          mtf.simd_mesh_impl.HierarchicalTiling.spec_to_mesh_shape(
              spec, num_cores
          )
      )
      self.assertEqual(mesh_shape, expected_mesh_shape)
      self.assertCountEqual(logical_to_physical, list(range(num_cores)))
  
file_path: mesh/mesh_tensorflow/simd_mesh_impl_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import mesh_tensorflow
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling the SimdMeshImplTest obj's underlying member method code with example usage: obj.testHierarchicalTiling(physical_shape, spec) without return types