def set(self, text):
        """Set obj text.

        text (string)
            value to be used as label text.
        """
        ### return earlier if text is already set
        if text == self.contents:
            return

        ### otherwise "clear" contents and add text

        self.contents = ""
        self.add_text(text)
Set obj text.

        text (string)
            value to be used as label text.
        
nodezator/textman/label/main.py