def METHOD_NAME(self):
    import _lsprof
    # Must use a file as StringIO doesn't trigger the bug.
    sys.stderr = open(TESTFN, 'w')
    try:
        obj = _lsprof.Profiler(lambda: int)
        obj.enable()
        obj = _lsprof.Profiler(1)
        obj.disable()
    finally:
        sys.stderr = sys.__stderr__
        unlink(TESTFN)