def trim_keys(dict_):
    """remove dict keys with leading and trailing whitespace
    >>> trim_keys({' name': 'value'}) == {'name': 'value'}
    True
    """
    return {k.strip(): v for k, v in dict_.items()}