def preprocess_dict(d):
out_env = {}<EOL>for k, v in d.items():<EOL><INDENT>if not type(v) in PREPROCESSORS:<EOL><INDENT>raise KeyError('<STR_LIT>'.format(type(v)))<EOL><DEDENT>out_env[k] = PREPROCESSORS[type(v)](v)<EOL><DEDENT>return out_env<EOL>
Preprocess a dict to be used as environment variables.

:param d: dict to be processed