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: Should be called by each client upon completion, to ensure a clean exit.
docstr_tok: ["Should","be","called","by","each","client","upon","completion",",","to","ensure","a","clean","exit","."]
code: def join(self) -> None:
      """Should be called by each client upon completion, to ensure a clean exit."""
      send(_JOIN_KEY, self.server_rank)
      recv(self.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 3 for calling the Client obj's underlying member method code with example usage: obj.join() without return types