def _read_header(f):
<EOL>line = f.readline().decode("<STR_LIT:utf-8>")<EOL>str_list = list(filter(None, line.split()))<EOL>fmt_version = str_list[<NUM_LIT:0>]<EOL>assert str_list[<NUM_LIT:1>] in ["<STR_LIT:0>", "<STR_LIT:1>"]<EOL>is_ascii = str_list[<NUM_LIT:1>] == "<STR_LIT:0>"<EOL>data_size = int(str_list[<NUM_LIT:2>])<EOL>if not is_ascii:<EOL><INDENT>one = f.read(struct.calcsize("<STR_LIT:i>"))<EOL>assert struct.unpack("<STR_LIT:i>", one)[<NUM_LIT:0>] == <NUM_LIT:1><EOL>line = f.readline().decode("<STR_LIT:utf-8>")<EOL>assert line == "<STR_LIT:\n>"<EOL><DEDENT>line = f.readline().decode("<STR_LIT:utf-8>")<EOL>assert line.strip() == "<STR_LIT>"<EOL>return fmt_version, data_size, is_ascii<EOL>
Read the mesh format block

    specified as

     version(ASCII double; currently 4.1)
       file-type(ASCII int; 0 for ASCII mode, 1 for binary mode)
       data-size(ASCII int; sizeof(size_t))
     < int with value one; only in binary mode, to detect endianness >

    though here the version is left as str