code: def call(self, method, *args, **kwargs):
          
          tried_reconnect = False
          for _ in range(2):
              try:
                  self._send_call(self.deluge_version, self.deluge_protocol_version, method, *args, **kwargs)
                  return self._receive_response(self.deluge_version, self.deluge_protocol_version)
              except (socket.error, ConnectionLostException, CallTimeoutException):
                  if self.automatic_reconnect:
                      if tried_reconnect:
                          raise FailedToReconnectException()
                      else:
                          try:
                              self.reconnect()
                          except (socket.error, ConnectionLostException, CallTimeoutException):
                              raise FailedToReconnectException()
  
                      tried_reconnect = True
                  else:
                      raise
docs: Calls an RPC function