def METHOD_NAME(repo, snapshots):
    """Check the baseurl to see if it is a valid snapshot, and if there is a newer one
    available.
    """
    invalid = None
    newer = None
    url = urlparse(repo)
    snapshot = os.path.basename(url.path)
    # Is this snapshot valid?
    if snapshot not in snapshots:
        invalid = f"{snapshot} is not a valid snapshot name"
    # is this snapshot old?
    base = snapshot.rsplit("-", 1)[0]
    newest = snapshot
    for s in snapshots:
        if s.rsplit("-", 1)[0] != base:
            continue
        if s > newest:
            newest = s
    if newest != snapshot:
        newer = f"{snapshot} has a newer version - {newest}"
    return invalid, newer