def METHOD_NAME(ncp_pre_lines):
    version_string=''
    for line in ncp_pre_lines:
        if ( "Amanzi input format version".lower() in line.lower() ):
            version_string=line.split('"')[-2]
            version_major, version_minor, version_patch = version_string.split('.')
            if ( int(version_major) == 1 and int(version_minor) == 2 or int(version_patch) == 2 or int(version_patch) == 3 ):
                break
            else:
                print('Error: This scripts translates version 1.2.2 to 1.2.3')
                print('       But this input file is version', version_string)
                sys.exit()
    if ( version_string == '' ):
        print('Error: The version string is empty!')
        sys.exit()
    return version_string