docstr: Args:
      gpus ([int]): list of GPU ids.
      ps_device: either 'gpu' or 'cpu', where variables are stored.
          The default value is subject to change.
docstr_tok: ["Args",":","gpus","(","[","int","]",")",":","list","of","GPU","ids",".","ps_device",":","either","'gpu","'","or","'cpu","'",",","where","variables","are","stored",".","The","default","value","is","subject","to","change","."]
code: def __init__(self, gpus, ps_device=None):
      """
      Args:
          gpus ([int]): list of GPU ids.
          ps_device: either 'gpu' or 'cpu', where variables are stored.
              The default value is subject to change.
      """
      self.devices = gpus
      if ps_device is None:
          ps_device = "gpu" if len(gpus) <= 2 else "cpu"
      self._builder = SyncMultiGPUParameterServerBuilder(
          gpus, ps_device
      )
      super(SyncMultiGPUTrainerParameterServer, self).__init__()
  
imports: import multiprocessing
  import os
  import sys
  import tensorflow
  from tensorpack.compat import tfv1
  from ..callbacks import CallbackFactory, RunOp
  from ..graph_builder.distributed import DistributedParameterServerBuilder, DistributedReplicatedBuilder
  from ..graph_builder.training import AsyncMultiGPUBuilder, SyncMultiGPUParameterServerBuilder, SyncMultiGPUReplicatedBuilder
  from ..graph_builder.utils import override_to_local_variable
  from ..input_source import FeedfreeInput, QueueInput
  from ..tfutils import get_global_step_var
  from ..tfutils.common import get_tf_version_tuple
  from ..tfutils.distributed import get_distributed_session_creator
  from ..tfutils.sesscreate import NewSessionCreator
  from ..tfutils.tower import TrainTowerContext
  from ..utils import logger
  from ..utils.argtools import map_arg
  from ..utils.develop import HIDE_DOC, deprecated
  from .tower import SingleCostTrainer
label_desc: Use image node_id 1 to create a new SyncMultiGPUTrainerParameterServer object from inherited base classes: SingleCostTrainer with example: obj = SyncMultiGPUTrainerParameterServer(gpus, ps_device)