code: def _check_heartbeats(self, ts, *args, **kwargs):
          
          for chan_id in self._heartbeats:
              if ts - self._heartbeats[chan_id] >= 10:
                  if chan_id not in self._late_heartbeats:
                      try:
                          # This is newly late; escalate
                          log.warning("BitfinexWSS.heartbeats: Channel %s hasn't "
                                      "sent a heartbeat in %s seconds!",
                                      self.channel_labels[chan_id],
                                      ts - self._heartbeats[chan_id])
                          self._late_heartbeats[chan_id] = ts
                      except KeyError:
                          # This channel ID Is not known to us - log and raise
                          log.error("BitfinexWSS.heartbeats: Channel %s is not "
                                    "registered in the connector's registry! "
                                    "Restarting Connection to avoid errors..",
                                    chan_id)
                          raise UnknownChannelError
                  else:
                      # We know of this already
                      continue
              else:
                  # its not late
                  try:
                      self._late_heartbeats.pop(chan_id)
                  except KeyError:
                      # wasn't late before, check next channel
                      continue
                  log.info("BitfinexWSS.heartbeats: Channel %s has sent a "
                           "heartbeat again!", self.channel_labels[chan_id])
              self.ping()
docs: Checks if the heartbeats are on-time. If not, the channel id is escalated
          to self._late_heartbeats and a warning is issued; once a hb is received
          again from this channel, it'll be removed from this dict, and an Info
          message logged.
          :param ts: timestamp, declares when data was received by the client
          :return: