def flip_dict(d):
    """Returns a dict with values and keys reversed.

    Args:
        d: The dict to flip the values and keys of.

    Returns:
        A dict whose keys are the values of the original dict, and whose values
        are the corresponding keys.
    """
    return {v: k for k, v in d.items()}