<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _heartbeat(self, queue, task_ids):
 """ Updates the heartbeat for the given task IDs to prevent them from timing out and being requeued. """

        now = time.time()
        self.connection.zadd(self._key(ACTIVE, queue),
                             **{task_id: now for task_id in task_ids})