def infer_isinstance(callnode, context=None):
call = arguments.CallSite.from_call(callnode)<EOL>if call.keyword_arguments:<EOL><INDENT>raise UseInferenceDefault("<STR_LIT>")<EOL><DEDENT>if len(call.positional_arguments) != <NUM_LIT:2>:<EOL><INDENT>raise UseInferenceDefault(<EOL>"<STR_LIT>".format(<EOL>count=len(call.positional_arguments)<EOL>)<EOL>)<EOL><DEDENT>obj_node, class_or_tuple_node = call.positional_arguments<EOL>try:<EOL><INDENT>class_container = _class_or_tuple_to_container(<EOL>class_or_tuple_node, context=context<EOL>)<EOL><DEDENT>except InferenceError:<EOL><INDENT>raise UseInferenceDefault<EOL><DEDENT>try:<EOL><INDENT>isinstance_bool = helpers.object_isinstance(obj_node, class_container, context)<EOL><DEDENT>except AstroidTypeError as exc:<EOL><INDENT>raise UseInferenceDefault("<STR_LIT>" + str(exc))<EOL><DEDENT>except MroError as exc:<EOL><INDENT>raise UseInferenceDefault from exc<EOL><DEDENT>if isinstance_bool is util.Uninferable:<EOL><INDENT>raise UseInferenceDefault<EOL><DEDENT>return nodes.Const(isinstance_bool)<EOL>
Infer isinstance calls

    :param nodes.Call callnode: an isinstance call
    :param InferenceContext: context for call
        (currently unused but is a common interface for inference)
    :rtype nodes.Const: Boolean Const value of isinstance call

    :raises UseInferenceDefault: If the node cannot be inferred