docs: def send(self, data=None, headers=None, ttl=0, gcm_key=None, reg_id=None,
               content_encoding="aes128gcm", curl=False, timeout=None):
          """Encode and send the data to the Push Service.
  
          :param data: A serialized block of data (see encode() ).
          :type data: str
          :param headers: A dictionary containing any additional HTTP headers.
          :type headers: dict
          :param ttl: The Time To Live in seconds for this message if the
              recipient is not online. (Defaults to "0", which discards the
              message immediately if the recipient is unavailable.)
          :type ttl: int
          :param gcm_key: API key obtained from the Google Developer Console.
              Needed if endpoint is https://android.googleapis.com/gcm/send
          :type gcm_key: string
          :param reg_id: registration id of the recipient. If not provided,
              it will be extracted from the endpoint.
          :type reg_id: str
          :param content_encoding: ECE content encoding (defaults to "aes128gcm")
          :type content_encoding: str
          :param curl: Display output as `curl` command instead of sending
          :type curl: bool
          :param timeout: POST requests timeout
          :type timeout: float or tuple
  
          """
          # Encode the data.
          if headers is None:
              headers = dict()
          encoded = {}
          headers = CaseInsensitiveDict(headers)
          if data:
              encoded = self.encode(data, content_encoding)
              if "crypto_key" in encoded:
                  # Append the p256dh to the end of any existing crypto-key
                  crypto_key = headers.get("crypto-key", "")
                  if crypto_key:
                      # due to some confusion by a push service provider, we
                      # should use ';' instead of ',' to append the headers.
                      # see
                      # https://github.com/webpush-wg/webpush-encryption/issues/6
                      crypto_key += ';'
                  crypto_key += (
                      "dh=" + encoded["crypto_key"].decode('utf8'))
                  headers.update({
                      'crypto-key': crypto_key
                  })
              if "salt" in encoded:
                  headers.update({
                      'encryption': "salt=" + encoded['salt'].decode('utf8')
                  })
              headers.update({
                  'content-encoding': content_encoding,
              })
          if gcm_key:
              # guess if it is a legacy GCM project key or actual FCM key
              # gcm keys are all about 40 chars (use 100 for confidence),
              # fcm keys are 153-175 chars
              if len(gcm_key) < 100:
                  endpoint = 'https://android.googleapis.com/gcm/send'
              else:
                  endpoint = 'https://fcm.googleapis.com/fcm/send'
              reg_ids = []
              if not reg_id:
                  reg_id = self.subscription_info['endpoint'].rsplit('/', 1)[-1]
              reg_ids.append(reg_id)
              gcm_data = dict()
              gcm_data['registration_ids'] = reg_ids
              if data:
                  gcm_data['raw_data'] = base64.b64encode(
                      encoded.get('body')).decode('utf8')
              gcm_data['time_to_live'] = int(
                  headers['ttl'] if 'ttl' in headers else ttl)
              encoded_data = json.dumps(gcm_data)
              headers.update({
                  'Authorization': 'key='+gcm_key,
                  'Content-Type': 'application/json',
              })
          else:
              encoded_data = encoded.get('body')
              endpoint = self.subscription_info['endpoint']
  
          if 'ttl' not in headers or ttl:
              headers['ttl'] = str(ttl or 0)
          # Additionally useful headers:
          # Authorization / Crypto-Key (VAPID headers)
          if curl:
              return self.as_curl(endpoint, encoded_data, headers)
          return self.requests_method.post(endpoint,
                                           data=encoded_data,
                                           headers=headers,
                                           timeout=timeout)