'Set the stanza\'s ``\'type\'`` attribute.
Only type values contained in :attr:`types` are accepted.
:param string value: One of the values contained in :attr:`types`'

def set_type(self, value):

    if (value in self.types):
        self.xml.attrib[u'type'] = value
    return self
