def METHOD_NAME(self) -> t.List[bytes]:
    """Calculate hashes of chunks of `code`.
    Assume that the first `code_offset` bytes of `code` are taken up by the header.
    """
    hashes = []
    # End offset for each chunk. Normally this would be (i+1)*chunk_size for i-th chunk,
    # but the first chunk is shorter by code_offset, so all end offsets are shifted.
    ends = [
        (i + 1) * self.HASH_PARAMS.chunk_size - self._code_offset for i in range(16)
    ]
    start = 0
    for end in ends:
        chunk = self.code[start:end]
        # padding for last non-empty chunk
        if (
            self.HASH_PARAMS.padding_byte is not None
            and start < len(self.code)
            and end > len(self.code)
        ):
            chunk += self.HASH_PARAMS.padding_byte[0:1] * (end - start - len(chunk))
        if not chunk:
            hashes.append(b"\0" * 32)
        else:
            hashes.append(self.HASH_PARAMS.hash_function(chunk).digest())
        start = end
    return hashes