

def InstallOsTextGenerator(self, min_os=None, max_os=None):
    'Generates readable text about minimum and maximum OSs for a package.\n\n    Args:\n      min_os: Minimum OS setting as a string.\n      max_os: Maximum OS setting as a string.\n\n    Returns:\n      result: String, which OSs will get the install.\n    '
    min_os_major = GetOSXMajorVersion(min_os)
    if ((min_os_major == '4') or (min_os_major == '5')):
        min_os_major = None
    max_os_major = GetOSXMajorVersion(max_os)
    if (max_os_major or min_os_major):
        if (max_os_major == min_os_major):
            result_string = (' %s %s.' % (settings.RELEASE_REPORT_VERSION_VERB, OSX_VERSIONS[max_os_major]))
        elif (max_os_major and (not min_os_major)):
            result_string = (' %s %s and earlier versions of the OS.' % (settings.RELEASE_REPORT_VERSION_VERB, OSX_VERSIONS[max_os_major]))
        elif (min_os_major and (not max_os_major)):
            result_string = (' %s %s and later versions of the OS.' % (settings.RELEASE_REPORT_VERSION_VERB, OSX_VERSIONS[min_os_major]))
        else:
            version_list = []
            for version_number in range(int(min_os_major), (int(max_os_major) + 1)):
                version_list.append(OSX_VERSIONS[str(version_number)])
            and_list = ' and '.join(version_list)
            grammar_string = and_list.replace(' and ', ', ', (len(version_list) - 2))
            result_string = (' %s %s.' % (settings.RELEASE_REPORT_VERSION_VERB, grammar_string))
    else:
        result_string = '.'
    return result_string

dataset/ETHPy150Open google/simian/src/simian/mac/admin/release_report.py ReleaseReport.InstallOsTextGenerator/original