def infer_dict_fromkeys(node, context=None):
def _build_dict_with_elements(elements):<EOL><INDENT>new_node = nodes.Dict(<EOL>col_offset=node.col_offset, lineno=node.lineno, parent=node.parent<EOL>)<EOL>new_node.postinit(elements)<EOL>return new_node<EOL><DEDENT>call = arguments.CallSite.from_call(node)<EOL>if call.keyword_arguments:<EOL><INDENT>raise UseInferenceDefault("<STR_LIT>")<EOL><DEDENT>if len(call.positional_arguments) not in {<NUM_LIT:1>, <NUM_LIT:2>}:<EOL><INDENT>raise UseInferenceDefault(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>default = nodes.Const(None)<EOL>values = call.positional_arguments[<NUM_LIT:0>]<EOL>try:<EOL><INDENT>inferred_values = next(values.infer(context=context))<EOL><DEDENT>except InferenceError:<EOL><INDENT>return _build_dict_with_elements([])<EOL><DEDENT>if inferred_values is util.Uninferable:<EOL><INDENT>return _build_dict_with_elements([])<EOL><DEDENT>accepted_iterable_elements = (nodes.Const,)<EOL>if isinstance(inferred_values, (nodes.List, nodes.Set, nodes.Tuple)):<EOL><INDENT>elements = inferred_values.elts<EOL>for element in elements:<EOL><INDENT>if not isinstance(element, accepted_iterable_elements):<EOL><INDENT>return _build_dict_with_elements([])<EOL><DEDENT><DEDENT>elements_with_value = [(element, default) for element in elements]<EOL>return _build_dict_with_elements(elements_with_value)<EOL><DEDENT>elif isinstance(inferred_values, nodes.Const) and isinstance(<EOL>inferred_values.value, (str, bytes)<EOL>):<EOL><INDENT>elements = [<EOL>(nodes.Const(element), default) for element in inferred_values.value<EOL>]<EOL>return _build_dict_with_elements(elements)<EOL><DEDENT>elif isinstance(inferred_values, nodes.Dict):<EOL><INDENT>keys = inferred_values.itered()<EOL>for key in keys:<EOL><INDENT>if not isinstance(key, accepted_iterable_elements):<EOL><INDENT>return _build_dict_with_elements([])<EOL><DEDENT><DEDENT>elements_with_value = [(element, default) for element in keys]<EOL>return _build_dict_with_elements(elements_with_value)<EOL><DEDENT>return _build_dict_with_elements([])<EOL>
Infer dict.fromkeys

    :param nodes.Call node: dict.fromkeys() call to infer
    :param context.InferenceContext: node context
    :rtype nodes.Dict:
        a Dictionary containing the values that astroid was able to infer.
        In case the inference failed for any reason, an empty dictionary
        will be inferred instead.