def read_header(self):
data = read_dtype(self.mat_stream, self.dtypes['<STR_LIT>'])<EOL>name = self.mat_stream.read(int(data['<STR_LIT>'])).strip(b'<STR_LIT:\x00>')<EOL>if data['<STR_LIT>'] < <NUM_LIT:0> or data['<STR_LIT>'] > <NUM_LIT>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>M, rest = divmod(data['<STR_LIT>'], <NUM_LIT:1000>)  <EOL>if M not in (<NUM_LIT:0>, <NUM_LIT:1>):<EOL><INDENT>warnings.warn("<STR_LIT>"<EOL>"<STR_LIT>" % order_codes[M],<EOL>UserWarning)<EOL><DEDENT>O, rest = divmod(rest, <NUM_LIT:100>)  <EOL>if O != <NUM_LIT:0>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>P, rest = divmod(rest, <NUM_LIT:10>)  <EOL>T = rest  <EOL>dims = (data['<STR_LIT>'], data['<STR_LIT>'])<EOL>is_complex = data['<STR_LIT>'] == <NUM_LIT:1><EOL>dtype = self.dtypes[P]<EOL>return VarHeader4(<EOL>name,<EOL>dtype,<EOL>T,<EOL>dims,<EOL>is_complex)<EOL>
Read and return header for variable