<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scoped_format(txt, **objects):
 """Format a string with respect to a set of objects' attributes. Example: hello Dave Args: objects (dict):
 Dict of objects to format with. If a value is a dict, its values, and any further neted dicts, will also format with dot notation. pretty (bool):
 See `ObjectStringFormatter`. expand (bool):
 See `ObjectStringFormatter`. """

    pretty = objects.pop("pretty", RecursiveAttribute.format_pretty)
    expand = objects.pop("expand", RecursiveAttribute.format_expand)
    attr = RecursiveAttribute(objects, read_only=True)
    formatter = scoped_formatter(**objects)
    return formatter.format(txt, pretty=pretty, expand=expand)