def tag_configure(self, tagname, option=None, **kwargs):
        """Query or modify options associated with the tag given by tagname.

        If no option is specified, a dict describing all of the available
        options for tagname is returned. If option is specified, then the
        command returns a list describing the one named option. Lastly, if
        kwargs is given then it corresponds to option-value pairs that should
        be modified."""
        if option is None and not kwargs:
            split1 = self.tk.splitlist(
                self.tk.call(self._w, 'tag', 'configure', tagname))

            result = {}
            for item in split1:
                res = self.tk.splitlist(item)
                result[res[0]] = res[1:]

            return result

        elif option:
            return self.tk.call(self._w, 'tag', 'configure', tagname,
                                '-%s' % option)

        else:
            args = ()
            for key, val in kwargs.items():
                args += ('-%s' % key, val)

            self.tk.call(self._w, 'tag', 'configure', tagname, *args)
dataset/ETHPy150Open Arelle/Arelle/arelle/TkTableWrapper.py/Table.tag_configure/original