def parseJuiceHeaders(lines):
b = JuiceBox()<EOL>bodylen = <NUM_LIT:0><EOL>key = None<EOL>for L in lines:<EOL><INDENT>if L[<NUM_LIT:0>] == '<STR_LIT:U+0020>':<EOL><INDENT>assert key is not None<EOL>b[key] += '<STR_LIT:\r\n>'+L[<NUM_LIT:1>:]<EOL>continue<EOL><DEDENT>parts = L.split('<STR_LIT>', <NUM_LIT:1>)<EOL>if len(parts) != <NUM_LIT:2>:<EOL><INDENT>raise MalformedJuiceBox("<STR_LIT>" % (L,))<EOL><DEDENT>key, value = parts<EOL>key = normalizeKey(key)<EOL>b[key] = value<EOL><DEDENT>return int(b.pop(LENGTH, <NUM_LIT:0>)), b<EOL>
Create a JuiceBox from a list of header lines.

@param lines: a list of lines.