code: def _GetSessionConfig(self):
      virtual_device_gpu_options = config_pb2.GPUOptions(
          visible_device_list=",".join(
              str(d) for d in self._visible_device_list
          ),
          experimental=config_pb2.GPUOptions.Experimental(
              virtual_devices=[
                  config_pb2.GPUOptions.Experimental.VirtualDevices(
                      memory_limit_mb=i
                  )
                  for i in self._mem_limits_mb
              ]
          ),
      )
      return config_pb2.ConfigProto(
          gpu_options=virtual_device_gpu_options
      )
  
imports: import random
  import numpy
  from google.protobuf import text_format
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 2 for calling the VirtualGpuTestUtil obj's underlying member method code with example usage: obj._GetSessionConfig() and returns: config_pb2