def _infer_type_new_call(self, caller, context):
from astroid import node_classes<EOL>mcs = next(caller.args[<NUM_LIT:0>].infer(context=context))<EOL>if mcs.__class__.__name__ != "<STR_LIT>":<EOL><INDENT>return None<EOL><DEDENT>if not mcs.is_subtype_of("<STR_LIT>" % BUILTINS):<EOL><INDENT>return None<EOL><DEDENT>name = next(caller.args[<NUM_LIT:1>].infer(context=context))<EOL>if name.__class__.__name__ != "<STR_LIT>":<EOL><INDENT>return None<EOL><DEDENT>if not isinstance(name.value, str):<EOL><INDENT>return None<EOL><DEDENT>bases = next(caller.args[<NUM_LIT:2>].infer(context=context))<EOL>if bases.__class__.__name__ != "<STR_LIT>":<EOL><INDENT>return None<EOL><DEDENT>inferred_bases = [next(elt.infer(context=context)) for elt in bases.elts]<EOL>if any(base.__class__.__name__ != "<STR_LIT>" for base in inferred_bases):<EOL><INDENT>return None<EOL><DEDENT>attrs = next(caller.args[<NUM_LIT:3>].infer(context=context))<EOL>if attrs.__class__.__name__ != "<STR_LIT>":<EOL><INDENT>return None<EOL><DEDENT>cls_locals = collections.defaultdict(list)<EOL>for key, value in attrs.items:<EOL><INDENT>key = next(key.infer(context=context))<EOL>value = next(value.infer(context=context))<EOL>if key.__class__.__name__ == "<STR_LIT>" and isinstance(key.value, str):<EOL><INDENT>cls_locals[key.value].append(value)<EOL><DEDENT><DEDENT>cls = mcs.__class__(<EOL>name=name.value,<EOL>lineno=caller.lineno,<EOL>col_offset=caller.col_offset,<EOL>parent=caller,<EOL>)<EOL>empty = node_classes.Pass()<EOL>cls.postinit(<EOL>bases=bases.elts,<EOL>body=[empty],<EOL>decorators=[],<EOL>newstyle=True,<EOL>metaclass=mcs,<EOL>keywords=[],<EOL>)<EOL>cls.locals = cls_locals<EOL>return cls<EOL>
Try to infer what type.__new__(mcs, name, bases, attrs) returns.

        In order for such call to be valid, the metaclass needs to be
        a subtype of ``type``, the name needs to be a string, the bases
        needs to be a tuple of classes