<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def names(expr: AST) -> Set[str]: """Names of globals in `expr`."""

    nodes = [node for node in ast.walk(expr) if isinstance(node, ast.Name)]
    loaded = {node.id for node in nodes if isinstance(node.ctx, ast.Load)}
    stored = {node.id for node in nodes if isinstance(node.ctx, ast.Store)}
    return loaded - stored