def _import_mapping(mapping, original=None):
<EOL>for key, value in list(mapping.items()):<EOL><INDENT>if isinstance(key, string_types):<EOL><INDENT>try:<EOL><INDENT>cls = import_item(key)<EOL><DEDENT>except Exception:<EOL><INDENT>if original and key not in original:<EOL><INDENT>print("<STR_LIT>", key, exc_info=True)<EOL><DEDENT>mapping.pop(key)<EOL><DEDENT>else:<EOL><INDENT>mapping[cls] = mapping.pop(key)<EOL><DEDENT><DEDENT><DEDENT>
Import any string-keys in a type mapping.