code: def send_rpc(self, address, rpc_id, call_payload, timeout=3.0):
          if not self.connected:
              raise HardwareError("Cannot send an RPC if we are not in a connected state")
          if timeout is None:
              timeout = 3.0
          status = -1
          payload = b''
          recording = None
          if self.connection_interrupted:
              self._try_reconnect()
          if self._record is not None:
              recording = _RecordedRPC(self.connection_string, address, rpc_id, call_payload)
              recording.start()
          try:
              payload = self._loop.run_coroutine(self.adapter.send_rpc(0, address, rpc_id, call_payload, timeout))
              status, payload = pack_rpc_response(payload, None)
          except VALID_RPC_EXCEPTIONS as exc:
              status, payload = pack_rpc_response(payload, exc)
          if self._record is not None:
              recording.finish(status, payload)
              self._recording.append(recording)
          if self.connection_interrupted:
              self._try_reconnect()
          return unpack_rpc_response(status, payload, rpc_id, address)