def METHOD_NAME():
    if 'NZBOP_SCRIPTDIR' not in os.environ:
        print("This script can only be called from NZBGet (11.0 or later).")
        sys.exit(0)
    if os.environ['NZBOP_VERSION'][0:5] < '11.0':
        print("[ERROR] NZBGet Version %s is not supported. Please update NZBGet." % (str(os.environ['NZBOP_VERSION'])))
        sys.exit(0)
    print("Script triggered from NZBGet Version %s." % (str(os.environ['NZBOP_VERSION'])))
    status = 0
    if 'NZBPP_TOTALSTATUS' in os.environ:
        if not os.environ['NZBPP_TOTALSTATUS'] == 'SUCCESS':
            print("[ERROR] Download failed with status %s." % (os.environ['NZBPP_STATUS']))
            status = 1
    else:
        # Check par status
        if os.environ['NZBPP_PARSTATUS'] == '1' or os.environ['NZBPP_PARSTATUS'] == '4':
            print("[ERROR] Par-repair failed, setting status \"failed\".")
            status = 1
        # Check unpack status
        if os.environ['NZBPP_UNPACKSTATUS'] == '1':
            print("[ERROR] Unpack failed, setting status \"failed\".")
            status = 1
        if os.environ['NZBPP_UNPACKSTATUS'] == '0' and os.environ['NZBPP_PARSTATUS'] == '0':
            # Unpack was skipped due to nzb-file properties or due to errors during par-check
            if os.environ['NZBPP_HEALTH'] < 1000:
                print("[ERROR] Download health is compromised and Par-check/repair disabled or no .par2 files found. " \
                      "Setting status \"failed\".")
                print("[ERROR] Please check your Par-check/repair settings for future downloads.")
                status = 1
            else:
                print("[ERROR] Par-check/repair disabled or no .par2 files found, and Unpack not required. Health is " \
                      "ok so handle as though download successful.")
                print("[WARNING] Please check your Par-check/repair settings for future downloads.")
    # Check if destination directory exists (important for reprocessing of history items)
    if not os.path.isdir(os.environ['NZBPP_DIRECTORY']):
        print("[ERROR] Nothing to post-process: destination directory", os.environ[
            'NZBPP_DIRECTORY'], "doesn't exist. Setting status \"failed\".")
        status = 1
    # All checks done, now launching the script.
    if status == 1:
        sys.exit(NZBGET_POSTPROCESS_NONE)