def svg_repr(self):
        """Return svg rect element representing object."""
        rect = self.rect.inflate(-2, -2)

        return Element(
            "rect",
            {
                attr_name: str(getattr(rect, attr_name))
                for attr_name in (
                    "x",
                    "y",
                    "width",
                    "height",
                )
            },
        )
Return svg rect element representing object.
nodezator/classes2d/single.py