'Create a heartbeat on connection sending a heartbeat frame every
interval seconds.
:param pika.connection.Connection: Connection object
:param int interval: Heartbeat check interval
:param int idle_count: Number of heartbeat intervals missed until the
connection is considered idle and disconnects'

def __init__(self, connection, interval, idle_count=MAX_IDLE_COUNT):

    self._connection = connection
    self._interval = interval
    self._max_idle_count = idle_count
    self._bytes_received = 0
    self._bytes_sent = 0
    self._heartbeat_frames_received = 0
    self._heartbeat_frames_sent = 0
    self._idle_byte_intervals = 0
    self._timer = None
    self._setup_timer()
