def send_stream_head(self, stanza_namespace, stream_from, stream_to,<EOL>stream_id = None, version = '<STR_LIT:1.0>', language = None):
<EOL>with self.lock:<EOL><INDENT>self._serializer = XMPPSerializer(stanza_namespace,<EOL>self.settings["<STR_LIT>"])<EOL>head = self._serializer.emit_head(stream_from, stream_to,<EOL>stream_id, version, language)<EOL>self._write(head.encode("<STR_LIT:utf-8>"))<EOL><DEDENT>
Send stream head via the transport.

:Parameters:
    - `stanza_namespace`: namespace of stream stanzas (e.g.
      'jabber:client')
    - `stream_from`: the 'from' attribute of the stream. May be `None`.
    - `stream_to`: the 'to' attribute of the stream. May be `None`.
    - `version`: the 'version' of the stream.
    - `language`: the 'xml:lang' of the stream
:Types:
    - `stanza_namespace`: `unicode`
    - `stream_from`: `unicode`
    - `stream_to`: `unicode`
    - `version`: `unicode`
    - `language`: `unicode`