code: def setUp(self):
      super(APITest, self).setUp()
      global_ids = test_util.create_device_ids_array((2, 2))
      local_device_ids = np.ravel(global_ids).tolist()
      mesh_dict = {
          "CPU": Mesh(
              [_MESH_DIM_X, _MESH_DIM_Y],
              global_ids,
              local_device_ids,
              test_util.create_device_list((2, 2), "CPU"),
          )
      }
      self.mesh = self.configTestMesh(mesh_dict)
      self.layouts_1d = [
          Layout.replicated(self.mesh, rank=1),
          Layout.batch_sharded(self.mesh, _MESH_DIM_X, rank=1),
          Layout.batch_sharded(self.mesh, _MESH_DIM_Y, rank=1),
      ]
      self.layouts_2d = [
          Layout.replicated(self.mesh, rank=2),
          Layout.batch_sharded(self.mesh, _MESH_DIM_X, rank=2),
          Layout.inner_sharded(self.mesh, _MESH_DIM_X, rank=2),
          Layout([_MESH_DIM_X, _MESH_DIM_Y], self.mesh),
      ]
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.dtensor.python import api
  from tensorflow.dtensor.python import d_random
  from tensorflow.dtensor.python import layout
  from tensorflow.dtensor.python import numpy_util
  from tensorflow.dtensor.python.tests import test_util
  from tensorflow.python.eager.polymorphic_function import polymorphic_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the APITest obj's underlying member method code with example usage: obj.setUp() without return types