def write(self, output_stream, kmip_version=enums.KMIPVersion.KMIP_1_0):
local_stream = BytearrayStream()<EOL>if self._unique_identifier:<EOL><INDENT>self._unique_identifier.write(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if self._cryptographic_parameters:<EOL><INDENT>self._cryptographic_parameters.write(<EOL>local_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL><DEDENT>self.length = local_stream.length()<EOL>super(MACSignatureKeyInformation, self).write(<EOL>output_stream,<EOL>kmip_version=kmip_version<EOL>)<EOL>output_stream.write(local_stream.buffer)<EOL>
Write the data encoding the MACSignatureKeyInformation struct to a
stream.

Args:
    output_stream (stream): A data stream in which to encode object
        data, supporting a write method; usually a BytearrayStream
        object.
    kmip_version (KMIPVersion): An enumeration defining the KMIP
        version with which the object will be encoded. Optional,
        defaults to KMIP 1.0.