'Create a stanza object from a given XML object.
If a specialized stanza type is not found for the XML, then
a generic :class:`~sleekxmpp.xmlstream.stanzabase.StanzaBase`
stanza will be returned.
:param xml: The :class:`~xml.etree.ElementTree.Element` XML object
to convert into a stanza object.
:param default_ns: Optional default namespace to use instead of the
stream\'s current default namespace.'

def _build_stanza(self, xml, default_ns=None):

    if (default_ns is None):
        default_ns = self.default_ns
    stanza_type = StanzaBase
    for stanza_class in self.__root_stanza:
        if ((xml.tag == (u'{%s}%s' % (default_ns, stanza_class.name))) or (xml.tag == stanza_class.tag_name())):
            stanza_type = stanza_class
            break
    stanza = stanza_type(self, xml)
    if ((stanza[u'lang'] is None) and self.peer_default_lang):
        stanza[u'lang'] = self.peer_default_lang
    return stanza
