def simplify(self):
        """
        Simplify the content of a Composite merging any parts that can be
        and returning the new Composite as well as updating itself internally
        """
        final_output = []
        diff_last = None
        item_last = None
        for item in self._content:
            # remove any undefined colors
            if hasattr(item.get("color"), "none_setting"):
                del item["color"]
            # ignore empty items
            if not item.get("full_text") and not item.get("separator"):
                continue
            # merge items if we can
            diff = item.copy()
            del diff["full_text"]

            if diff == diff_last or (item["full_text"].strip() == "" and item_last):
                item_last["full_text"] += item["full_text"]
            else:
                diff_last = diff
                item_last = item.copy()  # copy item as we may change it
                final_output.append(item_last)
        self._content = final_output
        return self

        Simplify the content of a Composite merging any parts that can be
        and returning the new Composite as well as updating itself internally
        
py3status/composite.py