import ast


def name(value: str) -> ast.Name:
    """Generate an ast name expression"""
    if not value.isidentifier():
        raise ValueError("name must be a valid Python identifier")
    return ast.Name(id=value, ctx=ast.Load())