def _infer_map(node, context):
values = {}<EOL>for name, value in node.items:<EOL><INDENT>if isinstance(name, nodes.DictUnpack):<EOL><INDENT>double_starred = helpers.safe_infer(value, context)<EOL>if not double_starred:<EOL><INDENT>raise exceptions.InferenceError<EOL><DEDENT>if not isinstance(double_starred, nodes.Dict):<EOL><INDENT>raise exceptions.InferenceError(node=node, context=context)<EOL><DEDENT>unpack_items = _infer_map(double_starred, context)<EOL>values = _update_with_replacement(values, unpack_items)<EOL><DEDENT>else:<EOL><INDENT>key = helpers.safe_infer(name, context=context)<EOL>value = helpers.safe_infer(value, context=context)<EOL>if any(not elem for elem in (key, value)):<EOL><INDENT>raise exceptions.InferenceError(node=node, context=context)<EOL><DEDENT>values = _update_with_replacement(values, {key: value})<EOL><DEDENT><DEDENT>return values<EOL>
Infer all values based on Dict.items