async def METHOD_NAME(
    self, heartbeat_cutoff: datetime.datetime
) -> Dict[str, Any]:
    """
    Returns a `where` clause for loading zombie task runs from the DB
    """
    return {
        # the task run is RUNNING
        "state": {"_eq": "Running"},
        # ... but the flow run heartbeat is stale
        "flow_run": {"heartbeat": {"_lte": str(heartbeat_cutoff)}},
        # ... and the flow has heartbeats enabled
        "task": {
            "flow": {
                "flow_group": {
                    "_not": {
                        "settings": {"_contains": {"heartbeat_enabled": False}}
                    }
                }
            }
        },
    }