docs: def _send_request(self, method, params=[], is_subscribe = False):
          '''
              Send a new request to the server. Serialized the JSON and
              tracks id numbers and optional callbacks.
          '''
          # pick a new ID
          self.next_id += 1
          req_id = self.next_id
  
          # serialize as JSON
          msg = {'id': req_id, 'method': method, 'params': params}
  
          # subscriptions are a Q, normal requests are a future
          if is_subscribe:
              waitQ = asyncio.Queue()
              self.subscriptions[method].append(waitQ)
  
          fut = asyncio.Future(loop=self.loop)
  
          self.inflight[req_id] = (msg, fut)
  
          # send it via the transport, which serializes it
          if not self.protocol:
              logger.debug("Need to reconnect to server")
  
              async def connect_first():
                  await self.reconnect()
                  self.protocol.send_data(msg)
  
              self.loop.create_task(connect_first())
          else:
              # typical case, send request immediatedly, response is a future
              self.protocol.send_data(msg)
  
          return fut if not is_subscribe else (fut, waitQ)