def METHOD_NAME( aip_path, version ):
    # Open the local file and see if there is a version in it or in a previous file.
    lines = open(aip_path, "r").readlines()
    if not(version):
        # No version wanted - use local file, all versions
        return lines
    for line in lines:
        # version specified
        aip_version = re.search(_aip_pat, line)
        if aip_version:
            if aip_version.group(1) == version:
                # Version is defined in the local file
                return lines
        # Check the list of previous versions
        aip_link = re.search('^- \[([1-9]*.[0-9]*.[0-9]*)\]\((.*)\)', line)
        if aip_link:
            if aip_link.group(1) == version:
                # Found it - read in the raw version of the file from github and we'll use that
                lines = subprocess.run(['curl', '-L', '--silent', aip_link.group(2).replace('tree', 'raw')], stdout=subprocess.PIPE).stdout.decode('utf-8')
                return lines
    # Uh-oh - all the way through the file and no version found. Error and out...
    print('Error: AIP version %s not found' % (version))
    exit(1)