def METHOD_NAME(self, thread_factory, executable_factory):
    cardiac_arrest()
    pids = [self._pid() for _ in range(2)]
    thread = thread_factory()
    executable1 = executable_factory()
    executable2 = executable_factory()
    live(executable1, 'host0', pids[0], thread)
    live(executable2, 'host0', pids[1], thread)
    live(executable1, 'host1', pids[0], thread)
    live(executable2, 'host1', pids[1], thread)
    live(executable1, 'host2', pids[0], thread)
    live(executable2, 'host2', pids[1], thread)
    assert len(list_heartbeats()) == 6
    @transactional_session
    def __forge_updated_at(*, session=None):
        two_days_ago = datetime.utcnow() - timedelta(days=2)
        a_dozen_hours_ago = datetime.utcnow() - timedelta(hours=12)
        session.query(Heartbeats).filter_by(hostname='host1').update({'updated_at': two_days_ago})
        session.query(Heartbeats).filter_by(hostname='host2').update({'updated_at': a_dozen_hours_ago})
    __forge_updated_at()
    # Default expiration delay. Host1 health checks should get removed.
    sanity_check(executable=None, hostname=None)
    assert len(list_heartbeats()) == 4
    # Custom expiration delay. Host2 health checks should get removed too.
    sanity_check(executable2, 'host2', expiration_delay=timedelta(hours=5).total_seconds())
    assert len(list_heartbeats()) == 2