class_docstr: Tests for mesh_util that do not require accelerator initialization.
class_docstr_tok: ["Tests","for","mesh_util","that","do","not","require","accelerator","initialization","."]
code: def test_multi_client_mesh_creation(
      self, num_clients, is_initialized
  ):
      self.skipForDeviceType(
          ["GPU", "TPU"], reason="Test is intended for CPUs"
      )
      with mock.patch.object(
          accelerator_util, "is_initialized"
      ) as is_initialized:
          with mock.patch.object(config, "num_clients") as num_clients:
              num_clients.return_value = 2
              is_initialized.return_value = True
              test_util.reset_context()
              cpus = tf_config.list_physical_devices("CPU")
              tf_config.set_logical_device_configuration(
                  cpus[0], [context.LogicalDeviceConfiguration()] * 4
              )
              with mock.patch.object(
                  config, "client_id", return_value=0
              ):
                  mesh_1 = mesh_util.create_distributed_mesh(
                      mesh_name="multi_client_1d_mesh_1",
                      mesh_dims=[("x", 4)],
                      local_devices=["CPU:0", "CPU:1"],
                  )
              self.assertEqual(mesh_1.num_local_devices(), 2)
              self.assertEqual(mesh_1.size, 4)
              with mock.patch.object(
                  config, "client_id", return_value=1
              ):
                  mesh_2 = mesh_util.create_distributed_mesh(
                      mesh_name="multi_client_1d_mesh_2",
                      mesh_dims=[("x", 4)],
                      local_devices=["CPU:2", "CPU:3"],
                  )
              self.assertEqual(mesh_2.num_local_devices(), 2)
              self.assertEqual(mesh_2.size, 4)
  
imports: import os
  from unittest import mock
  from absl.testing import parameterized
  from tensorflow.dtensor.python import accelerator_util
  from tensorflow.dtensor.python import config
  from tensorflow.dtensor.python import mesh_util
  from tensorflow.dtensor.python.tests import test_util
  from tensorflow.python.eager import context
  from tensorflow.python.framework import config
  from tensorflow.python.framework import device
  from tensorflow.python.platform import test
label_desc: Use image node_id 14 for calling the MeshUtilTest obj's underlying member method code with example usage: obj.test_multi_client_mesh_creation(num_clients, is_initialized) without return types