def METHOD_NAME(version_string, allow_duplicate=False):
    """Check the provided version number.
    Returns True if the provided version is the 'newest' InvenTree release
    """
    print(f"Checking version '{version_string}'")
    # Check that the version string matches the required format
    match = re.match(r"^(\d+)\.(\d+)\.(\d+)(?: dev)?$", version_string)
    if not match or len(match.groups()) != 3:
        raise ValueError(f"Version string '{version_string}' did not match required pattern")
    version_tuple = [int(x) for x in match.groups()]
    # Look through the existing releases
    existing = get_existing_release_tags()
    # Assume that this is the highest release, unless told otherwise
    highest_release = True
    for release in existing:
        if release == version_tuple and not allow_duplicate:
            raise ValueError(f"Duplicate release '{version_string}' exists!")
        if release > version_tuple:
            highest_release = False
            print(f"Found newer release: {str(release)}")
    return highest_release