'Type inference and legalization'

def stage_nopython_frontend(self):

    with self.fallback_context(('Function    "%s"    failed    type    inference' % (self.func_id.func_name,))):
        (self.typemap, self.return_type, self.calltypes) = type_inference_stage(self.typingctx, self.func_ir, self.args, self.return_type, self.locals)
    with self.fallback_context(('Function    "%s"    has    invalid    return    type' % (self.func_id.func_name,))):
        legalize_return_type(self.return_type, self.func_ir, self.targetctx)
