class_docstr: A ParameterServer that uses specific process groups for communications.
  
  All ShardedParameterClients that want to talk to a ShardedParameterServer s must
  use the metadata and data pgs assigned to be used by s. s will be assigned 1
  metadata pg and self.num_data_pgs data pgs that are not used by any other
  ShardedParameterServers. Having distinct pgs used for comms to each
  ShardedParameterServer in combination with multiple threads on the client side
  avoids blocking comms calls that prevent clients from talking to multiple
  servers in parallel.
  
  For example, if the number of ShardedParameterServers = 2 and num_data_pgs = 3,
  then self.groups will have num_servers * (num_data_pgs + 1) = 8 ProcessGroups.
  When any client wants to talk to server 0, they will use self.groups[0] for
  metadata and self.groups[1:4] for data. When any client wants to talk to server
  1, they will use self.groups[4] for metadata and self.groups[5:8] for data.
class_docstr_tok: ["A","ParameterServer","that","uses","specific","process","groups","for","communications",".","All","ShardedParameterClients","that","want","to","talk","to","a","ShardedParameterServer","s","must","use","the","metadata","and","data","pgs","assigned","to","be","used","by","s.","s","will","be","assigned","1","metadata","pg","and","self.num_data_pgs","data","pgs","that","are","not","used","by","any","other","ShardedParameterServers",".","Having","distinct","pgs","used","for","comms","to","each","ShardedParameterServer","in","combination","with","multiple","threads","on","the","client","side","avoids","blocking","comms","calls","that","prevent","clients","from","talking","to","multiple","servers","in","parallel",".","For","example",",","if","the","number","of","ShardedParameterServers","=","2","and","num_data_pgs","=","3",",","then","self.groups","will","have","num_servers","*","(","num_data_pgs","+","1",")","=","8","ProcessGroups",".","When","any","client","wants","to","talk","to","server","0",",","they","will","use","self.groups","[","0","]","for","metadata","and","self.groups","[","1:4","]","for","data",".","When","any","client","wants","to","talk","to","server","1",",","they","will","use","self.groups","[","4","]","for","metadata","and","self.groups","[","5:8","]","for","data","."]
code: def _data_pgs(self) -> List["td.ProcessGroup"]:
      return _data_pgs(self.groups, self.num_data_pgs, td.get_rank())
  
imports: import logging
  import multiprocessing
  import queue
  import time
  import traceback
  from functools import lru_cache
  from typing import Callable, Dict, List, Optional, Sequence
  import torch
  import torch.distributed
  import torch.multiprocessing
  from torchbiggraph.distributed import init_process_group, Startable
  from torchbiggraph.types import CharTensorType, Rank
  from torchbiggraph.util import allocate_shared_tensor, split_almost_equally, tag_logs_with_process_name
label_desc: Use image node_id 3 for calling the ShardedParameterServer obj's underlying member method code with example usage: obj._data_pgs() and returns: _data_pgs