def infer_super(node, context=None):
if len(node.args) == <NUM_LIT:1>:<EOL><INDENT>raise UseInferenceDefault<EOL><DEDENT>scope = node.scope()<EOL>if not isinstance(scope, nodes.FunctionDef):<EOL><INDENT>raise UseInferenceDefault<EOL><DEDENT>if scope.type not in ("<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>raise UseInferenceDefault<EOL><DEDENT>cls = scoped_nodes.get_wrapping_class(scope)<EOL>if not len(node.args):<EOL><INDENT>mro_pointer = cls<EOL>if scope.type == "<STR_LIT>":<EOL><INDENT>mro_type = cls<EOL><DEDENT>else:<EOL><INDENT>mro_type = cls.instantiate_class()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>mro_pointer = next(node.args[<NUM_LIT:0>].infer(context=context))<EOL><DEDENT>except InferenceError:<EOL><INDENT>raise UseInferenceDefault<EOL><DEDENT>try:<EOL><INDENT>mro_type = next(node.args[<NUM_LIT:1>].infer(context=context))<EOL><DEDENT>except InferenceError:<EOL><INDENT>raise UseInferenceDefault<EOL><DEDENT><DEDENT>if mro_pointer is util.Uninferable or mro_type is util.Uninferable:<EOL><INDENT>raise UseInferenceDefault<EOL><DEDENT>super_obj = objects.Super(<EOL>mro_pointer=mro_pointer, mro_type=mro_type, self_class=cls, scope=scope<EOL>)<EOL>super_obj.parent = node<EOL>return super_obj<EOL>
Understand super calls.

    There are some restrictions for what can be understood:

        * unbounded super (one argument form) is not understood.

        * if the super call is not inside a function (classmethod or method),
          then the default inference will be used.

        * if the super arguments can't be inferred, the default inference
          will be used.