class_docstr: Class for writing mat5 files 
docstr: Initialize writer for matlab 5 format files
  
  Parameters
  ----------
  %(do_compression)s
  %(unicode_strings)s
  global_vars : None or sequence of strings, optional
      Names of variables to be marked as global for matlab
  %(long_fields)s
  %(oned_as)s
docstr_tok: ["Initialize","writer","for","matlab","5","format","files","Parameters","--","--","--","--","--","%","(","do_compression",")","s","%","(","unicode_strings",")","s","global_vars",":","None","or","sequence","of","strings",",","optional","Names","of","variables","to","be","marked","as","global","for","matlab","%","(","long_fields",")","s","%","(","oned_as",")","s"]
code: def __init__(
      self,
      file_stream,
      do_compression=False,
      unicode_strings=False,
      global_vars=None,
      long_field_names=False,
      oned_as="row",
  ):
      """Initialize writer for matlab 5 format files
  
      Parameters
      ----------
      %(do_compression)s
      %(unicode_strings)s
      global_vars : None or sequence of strings, optional
          Names of variables to be marked as global for matlab
      %(long_fields)s
      %(oned_as)s
      """
      self.file_stream = file_stream
      self.do_compression = do_compression
      self.unicode_strings = unicode_strings
      if global_vars:
          self.global_vars = global_vars
      else:
          self.global_vars = []
      self.long_field_names = long_field_names
      self.oned_as = oned_as
      self._matrix_writer = None
  
imports: import os
  import time
  import sys
  import zlib
  from io import BytesIO
  import warnings
  import numpy
  import scipy.sparse
  from .byteordercodes import native_code, swapped_code
  from .miobase import MatFileReader, docfiller, matdims, read_dtype, arr_to_chars, arr_dtype_number, MatWriteError, MatReadError, MatReadWarning
  from .mio5_utils import VarReader5
  from .mio5_params import MatlabObject, MatlabFunction, MDTYPES, NP_TO_MTYPES, NP_TO_MXTYPES, miCOMPRESSED, miMATRIX, miINT8, miUTF8, miUINT32, mxCELL_CLASS, mxSTRUCT_CLASS, mxOBJECT_CLASS, mxCHAR_CLASS, mxSPARSE_CLASS, mxDOUBLE_CLASS, mclass_info, mat_struct
  from .streams import ZlibInputStream
label_desc: Use image node_id 1 to create a new MatFile5Writer object  with example: obj = MatFile5Writer(file_stream, do_compression, unicode_strings, global_vars, long_field_names, oned_as)