code: def get_placement_mesh(hparams):
      graph = mtf.Graph()
      mesh = mtf.Mesh(graph, "my_mesh")
      mesh_shape = mtf.convert_to_shape(hparams.mesh_shape)
  
      mesh_devices = [""] * mesh_shape.size
      mesh_impl = mtf.placement_mesh_impl.PlacementMeshImpl(
          mesh_shape, hparams.layout, mesh_devices
      )
      return mesh, mesh_impl
  
file_path: tensor2tensor/tensor2tensor/models/mtf_transformer_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import mesh_tensorflow
  import numpy
  from tensor2tensor.data_generators import problem_hparams
  from tensor2tensor.models import mtf_transformer
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 2 for calling a global function with example usage: get_placement_mesh(hparams) and returns: mesh,  mesh_impl