Return new dictionary with keys and values swapped (assumes all unique values).
Source code in earthcarekit/utils/dict.py
| def invert_dict(d: dict[A, B]) -> dict[B, A]:
"""Return new dictionary with keys and values swapped (assumes all unique values)."""
return {v: k for k, v in d.items()}
|