docstr: connect to peers.  `peers` will be a dict of 4-tuples, keyed by name.
  {peer : (ident, addr, pub_addr, location)}
  where peer is the name, ident is the XREP identity, addr,pub_addr are the
docstr_tok: ["connect","to","peers",".","`","peers","`","will","be","a","dict","of","4-tuples",",","keyed","by","name",".","{","peer",":","(","ident",",","addr",",","pub_addr",",","location",")","}","where","peer","is","the","name",",","ident","is","the","XREP","identity",",","addr",",","pub_addr","are","the"]
code: def connect(self, peers):
      """connect to peers.  `peers` will be a dict of 4-tuples, keyed by name.
      {peer : (ident, addr, pub_addr, location)}
      where peer is the name, ident is the XREP identity, addr,pub_addr are the
      """
      for peer, (ident, url, pub_url, location) in peers.items():
          self.peers[peer] = ident
          if ident != self.identity:
              self.sub.connect(disambiguate_url(pub_url, location))
          if ident > self.identity:
              # prevent duplicate xrep, by only connecting
              # engines to engines with higher IDENTITY
              # a doubly-connected pair will crash
              self.socket.connect(disambiguate_url(url, location))
  
file_path: ipyparallel/docs/source/examples/interengine/communicator.py
imports: import socket
  import uuid
  import zmq
  from ipyparallel.util import disambiguate_url
label_desc: Use image node_id 4 for calling the EngineCommunicator obj's underlying member method code with example usage: obj.connect(peers) without return types