def _set_tag(self, tag):
    if isinstance(self._qname, tuple):
      self._qname = self._qname.copy()
      if self._qname[0].startswith('{'):
        self._qname[0] = '{%s}%s' % (self._get_namespace(1), tag)
      else:
        self._qname[0] = tag
    else:
      if self._qname.startswith('{'):
        self._qname = '{%s}%s' % (self._get_namespace(), tag)
      else:
        self._qname = tag
dataset/ETHPy150Open CollabQ/CollabQ/vendor/atom/core.py/XmlElement._set_tag/original