def METHOD_NAME(self, name, predicate):
    # We need to fix the attribute value, since the for loop changes it.
    def lazy_format(attribute):
        return lambda: format_property(attribute) or self.diagram.gettext("unnamed")
    return Box(
        Text(
            text=name,
            style={
                "padding": (0, 0, 4, 0),
                "font-size": "x-small",
                "font-style": FontStyle.ITALIC,
            },
        ),
        *(
            Text(text=lazy_format(attribute), style={"text-align": TextAlign.LEFT})
            for attribute in self.subject.ownedAttribute
            if predicate(attribute)
        ),
        style={
            "padding": (4, 4, 4, 4),
            "min-height": 8,
            "justify-content": JustifyContent.START,
        },
        draw=draw_top_separator,
    )