code: def on_send(self, frame):
          
          if frame.cmd == CMD_CONNECT or frame.cmd == CMD_STOMP:
              if self.heartbeats != (0, 0):
                  frame.headers[HDR_HEARTBEAT] = '%s,%s' % self.heartbeats
          if self.next_outbound_heartbeat is not None:
              self.next_outbound_heartbeat = monotonic() + self.send_sleep
docs: Add the heartbeat header to the frame when connecting, and bump
          next outbound heartbeat timestamp.
  
          :param Frame frame: the Frame object