def METHOD_NAME(tags=(), unsupported=True, run_upgrade=True):
    leapp_path = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))),
                              'data/leapp-rerun-tests-repos/noroot_leapp.py')
    env = {'LEAPP_CONFIG': _LEAPP_RERUN_CONFIG}
    if os.path.exists(_LEAPP_DB_PATH):
        os.unlink(_LEAPP_DB_PATH)
    args = []
    for tag in tags:
        args.extend(['--only-actors-with-tag', tag])
    try:
        os.environ.update(env)
        if run_upgrade:
            subprocess.check_call([sys.executable, leapp_path, 'upgrade'], env=os.environ)
        if unsupported:
            env['LEAPP_UNSUPPORTED'] = '1'
        os.environ.update(env)
        return subprocess.check_output([sys.executable, leapp_path, 'rerun'] + args + ['FirstBoot'], env=os.environ)
    finally:
        os.environ.pop('LEAPP_CONFIG', None)
        os.environ.pop('LEAPP_UNSUPPORTED', None)