def generate_value_label(self, byteorder, encoding):
self._encoding = encoding<EOL>bio = BytesIO()<EOL>null_string = '<STR_LIT:\x00>'<EOL>null_byte = b'<STR_LIT:\x00>'<EOL>bio.write(struct.pack(byteorder + '<STR_LIT:i>', self.len))<EOL>labname = self._encode(_pad_bytes(self.labname[:<NUM_LIT:32>], <NUM_LIT>))<EOL>bio.write(labname)<EOL>for i in range(<NUM_LIT:3>):<EOL><INDENT>bio.write(struct.pack('<STR_LIT:c>', null_byte))<EOL><DEDENT>bio.write(struct.pack(byteorder + '<STR_LIT:i>', self.n))<EOL>bio.write(struct.pack(byteorder + '<STR_LIT:i>', self.text_len))<EOL>for offset in self.off:<EOL><INDENT>bio.write(struct.pack(byteorder + '<STR_LIT:i>', offset))<EOL><DEDENT>for value in self.val:<EOL><INDENT>bio.write(struct.pack(byteorder + '<STR_LIT:i>', value))<EOL><DEDENT>for text in self.txt:<EOL><INDENT>bio.write(self._encode(text + null_string))<EOL><DEDENT>bio.seek(<NUM_LIT:0>)<EOL>return bio.read()<EOL>
Parameters
----------
byteorder : str
    Byte order of the output
encoding : str
    File encoding

Returns
-------
value_label : bytes
    Bytes containing the formatted value label