import ast


def _mcpyrate_quotes_attr(attr):
    """Create an AST that, when compiled and run, looks up `mcpyrate.quotes.attr` in `Load` context."""
    mcpyrate_quotes_module = ast.Attribute(value=ast.Name(id="mcpyrate", ctx=ast.Load()),
                                           attr="quotes",
                                           ctx=ast.Load())
    return ast.Attribute(value=mcpyrate_quotes_module,
                         attr=attr,
                         ctx=ast.Load())