from typing import Callable


def filter_dict(d: dict, cond: Callable = bool) -> dict:
    """Filter a `dict` using a condition *cond*.

    Args:
        d: `dict` to filter
        cond: `Callable` which will be called for every value in the
            dictionary to determine whether to filter out the key.
            Defaults to a truthy check.

    Returns:
        A new dictionary consisting of only the keys whose values
        returned a truthy value when ran through the *cond* function.
    """
    return {key: value for key, value in d.items() if cond(value)}