def METHOD_NAME(self):
    """
    Ensures that lifted loops are handled correctly in obj mode
    """
    # the functions to jit
    def bar(x):
        return x
    def foo(x):
        h = 0.
        for i in range(x): # py 38 needs two loops for one to lift?!
            h = h + i
        for k in range(x):
            h = h + k
        if x:
            h = h - bar(x)
        return h
    # compile into an isolated context
    flags = Flags()
    flags.enable_pyobject = True
    flags.enable_looplift = True
    cres = compile_isolated(foo, [types.intp], flags=flags)
    ta = cres.type_annotation
    buf = StringIO()
    ta.html_annotate(buf)
    output = buf.getvalue()
    buf.close()
    self.assertIn("bar", output)
    self.assertIn("foo", output)
    self.assertIn("LiftedLoop", output)