def METHOD_NAME(spec: str) -> None:
    """
    Update version spec in all instances of _version.py
    Parameters
    ----------
    spec : str
        The new version spec to which to update.
    Raises
    ------
    AssertionError
        If the spec is not one of the following: final, beta, alpha, candidate
    """
    assert spec in ('final', 'beta', 'alpha', 'candidate')
    # find all _version.py files
    files = [
        file_ for file_ in Path("../").rglob("_version.py")
        if 'build' not in str(file_)
    ]
    info(f'found files={files}')
    # update spec in all files
    for file in files:
        info(f'File: {file}')
        info(f'Updating spec to: {spec}')
        with open(file, 'r') as f:
            content = f.read()
            new_content = re.sub(
                pattern, r"\1\2\g<3>'{}'\5\6\7\8".format(spec), content
            )
        info('Writing to file')
        with open(file, 'w') as f:
            f.write(new_content)