def METHOD_NAME(self, frame_type: int, data: Optional[dict] = None):
    """Send Ping or Pong"""
    if frame_type not in (Types.PING, Types.PONG):
        log.error(f"Heartbeat type must be PING or PONG, not {frame_type}")
        return
    if not self.sfm_endpoint:
        log.error("Trying to send heartbeat before SFM Endpoint is established")
        return
    stream_id = self.sfm_endpoint.next_stream_id()
    self.send_dict(frame_type, stream_id, data)