class_docstr: Helper class to assign variables on the least loaded ps-device.
  
  Usage:
  
      .. code-block:: python
  
          with tf.device(LeastLoadedDeviceSetter(...)):
              ...
docstr: Args:
      worker_device: the device to use for compute ops.
      ps_devices: a list of device to use for Variable ops.
docstr_tok: ["Args",":","worker_device",":","the","device","to","use","for","compute","ops",".","ps_devices",":","a","list","of","device","to","use","for","Variable","ops","."]
code: def __init__(self, worker_device, ps_devices):
      """
      Args:
          worker_device: the device to use for compute ops.
          ps_devices: a list of device to use for Variable ops.
      """
      self.ps_devices = ps_devices
      self.worker_device = worker_device
      self.ps_sizes = [0] * len(self.ps_devices)
  
imports: import operator
  from contextlib import contextmanager
  import tensorflow
  import threading
  from ..compat import tfv1
  from ..tfutils.common import get_tf_version_tuple
  from ..tfutils.scope_utils import cached_name_scope, under_name_scope
  from ..tfutils.varreplace import custom_getter_scope
  from ..utils import logger
  from ..utils.argtools import call_only_once
label_desc: Use image node_id 1 to create a new LeastLoadedDeviceSetter object from inherited base classes: object with example: obj = LeastLoadedDeviceSetter(worker_device, ps_devices)