<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ParseHeader(cls, script_data):
 """Parse a script integrity header. This function makes sure any integrity hashes are correctly parsed and returns a ScriptHeader structure containing the information that it was able to parse out. Args: script_data (bytearray):
 The script that we should parse. Raises: ArgumentError: If the script contains malformed data that cannot be parsed. Returns: ScriptHeader: The parsed script header information """


        if len(script_data) < UpdateScript.SCRIPT_HEADER_LENGTH:
            raise ArgumentError("Script is too short to contain a script header",
                                length=len(script_data), header_length=UpdateScript.SCRIPT_HEADER_LENGTH)

        embedded_hash, magic, total_length = struct.unpack_from("<16sLL", script_data)
        if magic != UpdateScript.SCRIPT_MAGIC:
            raise ArgumentError("Script has invalid magic value", expected=UpdateScript.SCRIPT_MAGIC, found=magic)

        if total_length != len(script_data):
            raise ArgumentError("Script length does not match embedded length",
                                embedded_length=total_length, length=len(script_data))

        hashed_data = script_data[16:]

        sha = hashlib.sha256()
        sha.update(hashed_data)
        hash_value = sha.digest()[:16]

        if not compare_digest(embedded_hash, hash_value):
            raise ArgumentError("Script has invalid embedded hash", embedded_hash=hexlify(embedded_hash),
                                calculated_hash=hexlify(hash_value))

        return ScriptHeader(UpdateScript.SCRIPT_HEADER_LENGTH, False, True, False)