def METHOD_NAME(graph, testclass):
    def test(allow_graph=True):
        limit = testclass(limit_fn=inside_rect_limits, rect_limits=rect_limits)
        limit2 = testclass(limit_fn=inside_rect_limits, rect_limits=rect_limit_enlarged)
        assert not limit.has_rect_limits
        assert limit.has_limits
        assert limit.limits_are_set
        assert not limit.limits_are_false
        inside = limit.inside(2)
        inside2 = limit.inside(2, guarantee_limits=True)
        outside = limit.inside(4)
        assert not limit2.has_rect_limits
        assert limit2.has_limits
        assert limit2.limits_are_set
        assert not limit2.limits_are_false
        inside21 = limit2.inside(2)
        inside22 = limit2.inside(2, guarantee_limits=True)
        outside2 = limit2.inside(4)
        if graph:
            equal = limit.equal(limit2, allow_graph=allow_graph)
        else:
            equal = limit == limit2
        return inside, inside2, outside, equal, inside21, inside22, outside2
    if graph:
        test = z.function(test)
    inside, inside2, outside, equal, inside21, inside22, outside2 = test()
    assert equal
    assert inside
    assert inside2
    assert not outside
    assert inside21
    assert inside22
    assert not outside2