"""Dictionary utility functions.""" from collections.abc import Iterable from typing import Any def exclude(d: dict[str, Any], *, keys: Iterable[str]) -> dict[str, Any]: """Return a copy of d with the specified keys removed.""" return {i: d[i] for i in d if i not in keys}