def __init__(self, stanza_namespace, extra_prefixes = None):
self.stanza_namespace = stanza_namespace<EOL>self._prefixes = {}<EOL>if extra_prefixes:<EOL><INDENT>self._prefixes.update(extra_prefixes)<EOL><DEDENT>self._root_prefixes = None<EOL>self._head_emitted = False<EOL>self._next_id = <NUM_LIT:1><EOL>
:Parameters:
    - `stanza_namespace`: the default namespace used for XMPP stanzas.
      E.g. 'jabber:client' for c2s connections.
    - `extra_prefixes`: mapping of namespaces to prefixes (not the
      other way) to be used on the stream. These prefixes will be
      declared on the root element and used in all descendants. That
      may be used to optimize the stream for size.
:Types:
    - `stanza_namespace`: `unicode`
    - `extra_prefixes`: `unicode` to `unicode` mapping.