def generate_state(td_count: int, node_count: int, records_count: int, ttl: int):
    """Utility method to generate a state dict"""
    return {
        f"td{i}.example.com": {
            "name": f"td{i}.example.com",
            "nodes": [f"node{n}" for n in range(node_count)],
            "records": [
                {"hostname": f"rec{r}", "weight": 100} for r in range(records_count)
            ],
            "ttl": ttl,
        }
        for i in range(td_count)
    }