class_docstr: A client for connecting to a subclass of `rpc.Server`.
  
  Example:
      init_method = "file://myfile.tmp"
      num_clients = 1
      torch.distributed.init_process_group('gloo',
                                           init_method=init_method,
                                           world_size=num_clients + 1,
                                           rank=1)
  
      c = Client(MyServer, server_rank=0)
  
      print(c.test_func(torch.arange(0, 3), k=2))
      # ('the result is ', tensor([ 2,  3,  4]))
  
      c.join()
class_docstr_tok: ["A","client","for","connecting","to","a","subclass","of","`","rpc.Server","`",".","Example",":","init_method","=","``","file",":","\/\/myfile.tmp","''","num_clients","=","1","torch.distributed.init_process_group","(","'gloo","'",",","init_method=init_method",",","world_size=num_clients","+","1",",","rank=1",")","c","=","Client","(","MyServer",",","server_rank=0",")","print","(","c.test_func","(","torch.arange","(","0",",","3",")",",","k=2",")",")","#","(","'the","result","is","'",",","tensor","(","[","2",",","3",",","4","]",")",")","c.join","(",")"]
docstr: Args:
      server_class: The class of the server object. This should be a
                    subclass of `rpc.Server`.
      server_rank: The rank of the node where the `rpc.Server` is running.
docstr_tok: ["Args",":","server_class",":","The","class","of","the","server","object",".","This","should","be","a","subclass","of","`","rpc.Server","`",".","server_rank",":","The","rank","of","the","node","where","the","`","rpc.Server","`","is","running","."]
code: def __init__(self, server_class, server_rank):
      """
      Args:
          server_class: The class of the server object. This should be a
                        subclass of `rpc.Server`.
          server_rank: The rank of the node where the `rpc.Server` is running.
      """
      self.server_class = server_class
      self.server_rank = server_rank
  
file_path: PyTorch-BigGraph/torchbiggraph/rpc.py
imports: import io
  import sys
  import traceback
  import numpy
  import torch
  import torch.distributed
label_desc: Use image node_id 1 to create a new Client object  with example: obj = Client(server_class, server_rank)