class_docstr: Class to read matlab 4 variables 
class_docstr_tok: ["Class","to","read","matlab","4","variables"]
docstr: Read and return header for variable 
docstr_tok: ["Read","and","return","header","for","variable"]
code: def read_header(self):
      """Read and return header for variable"""
      data = read_dtype(self.mat_stream, self.dtypes["header"])
      name = self.mat_stream.read(int(data["namlen"])).strip(b"\x00")
      if data["mopt"] < 0 or data["mopt"] > 5000:
          raise ValueError(
              "Mat 4 mopt wrong format, byteswapping problem?"
          )
      M, rest = divmod(data["mopt"], 1000)  # order code
      if M not in (0, 1):
          warnings.warn(
              "We do not support byte ordering '%s'; returned "
              "data may be corrupt" % order_codes[M],
              UserWarning,
          )
      O, rest = divmod(rest, 100)  # unused, should be 0
      if O != 0:
          raise ValueError(
              "O in MOPT integer should be 0, wrong format?"
          )
      P, rest = divmod(
          rest, 10
      )  # data type code e.g miDOUBLE (see above)
      T = rest  # matrix type code e.g. mxFULL_CLASS (see above)
      dims = (data["mrows"], data["ncols"])
      is_complex = data["imagf"] == 1
      dtype = self.dtypes[P]
      return VarHeader4(name, dtype, T, dims, is_complex)
  
imports: from __future__ import division, print_function, absolute_import
  import sys
  import warnings
  import numpy
  from numpy.compat import asbytes, asstr
  import scipy.sparse
  from scipy._lib.six import string_types
  from .miobase import MatFileReader, docfiller, matdims, read_dtype, convert_dtypes, arr_to_chars, arr_dtype_number
  from .mio_utils import squeeze_element, chars_to_strings
  from functools import reduce
label_desc: Use image node_id 2 for calling the VarReader4 obj's underlying member method code with example usage: obj.read_header() and returns: VarHeader4