def assert_valid_name ( name : str ) -> str : error = is_valid_name_error ( name ) if error : raise error return name
how to give name validation from input python
Uphold the spec rules about naming .
def assert_valid_name(name: str) -> str:
    """Uphold the spec rules about naming."""
    error = is_valid_name_error(name)
    if error:
        raise error
    return name