code: def testVGpu2P2V1Default(self):
      gpus = config.list_physical_devices("GPU")
      if len(gpus) != 2:
          self.skipTest("Need 2 GPUs")
  
      config.set_logical_device_configuration(
          gpus[0],
          [
              context.LogicalDeviceConfiguration(memory_limit=100),
              context.LogicalDeviceConfiguration(memory_limit=100),
          ],
      )
  
      context.ensure_initialized()
  
      vcpus = config.list_logical_devices("GPU")
      self.assertEqual(len(vcpus), 3)
  
file_path: tensorflow/tensorflow/python/framework/config_vgpu_test.py
imports: from tensorflow.python.eager import context
  from tensorflow.python.framework import config
  from tensorflow.python.framework import ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the DeviceTest obj's underlying member method code with example usage: obj.testVGpu2P2V1Default() without return types