def strip_keys(d, nones=False, depth=<NUM_LIT:0>):
ans = type(d)((str(k).strip(), v) for (k, v) in viewitems(OrderedDict(d))<EOL>if (not nones or (str(k).strip() and str(k).strip() != '<STR_LIT:None>')))<EOL>if int(depth) < <NUM_LIT:1>:<EOL><INDENT>return ans<EOL><DEDENT>if int(depth) > strip_keys.MAX_DEPTH:<EOL><INDENT>warnings.warn(RuntimeWarning("<STR_LIT>" % strip_keys.MAX_DEPTH))<EOL><DEDENT>for k, v in viewitems(ans):<EOL><INDENT>if isinstance(v, Mapping):<EOL><INDENT>ans[k] = strip_keys(v, nones=nones, depth=int(depth) - <NUM_LIT:1>)<EOL><DEDENT><DEDENT>return ans<EOL>
r"""Strip whitespace from all dictionary keys, to the depth indicated

    >>> strip_keys({' a': ' a', ' b\t c ': {'d e  ': 'd e  '}}) == {'a': ' a', 'b\t c': {'d e  ': 'd e  '}}
    True
    >>> strip_keys({' a': ' a', ' b\t c ': {'d e  ': 'd e  '}}, depth=100) == {'a': ' a', 'b\t c': {'d e': 'd e  '}}
    True