def METHOD_NAME():
    try:
        install_from_local_source()
    except Exception:
        pass
    try:
        import ensurepip
    except ImportError:
        pass
    else:
        try:
            install_from_ensurepip(ensurepip)
            return
        except Exception:
            if sys.platform == 'cli':
                print('\nFailed to upgrade pip, which is probably because of IronPython. Leaving the earlier version.')
                return
            print("\nFailed to upgrade pip, which probably indicates that it isn't installed properly.")
    if MAJOR_VERSION < (2, 5):
        print('Python versions earlier than 2.5 are not supported by PTVS.')
        return -1
    if MAJOR_VERSION == (3, 0):
        print('Python 3.0 is not supported by pip and setuptools')
        return -2
    if MAJOR_VERSION == (2, 5):
        install_from_source(
            'https://go.microsoft.com/fwlink/?LinkId=317602',
            'https://go.microsoft.com/fwlink/?LinkId=313647',
        )
        return
    if MAJOR_VERSION == (2, 6):
        install_from_pip('https://go.microsoft.com/fwlink/?linkid=874551')
        return
    if MAJOR_VERSION == (3, 1):
        install_from_source(
            'https://go.microsoft.com/fwlink/?LinkId=616616',
            'https://go.microsoft.com/fwlink/?LinkID=616614',
        )
        return
    try:
        install_from_pip('https://go.microsoft.com/fwlink/?LinkId=616663')
    except Exception:
        pass
    else:
        return
    print('\nFailed to install. Attempting direct download.')
    install_from_source(
        'https://go.microsoft.com/fwlink/?LinkId=317603',
        'https://go.microsoft.com/fwlink/?LinkId=317604',
    )