def METHOD_NAME(
    property: Property, prefix: list[str] | None = None
) -> Iterator[Attribute]:
    if isinstance(property.schema, Object):
        nested_prefix = prefix + [property.name] if prefix else [property.name]
        for nested in property.schema.properties:
            yield from METHOD_NAME(nested, prefix=nested_prefix)
    else:
        parts = (prefix or []) + [property.name]
        yield Attribute(parts)