! @brief Estimate how many pages are the same by reading data.

        Pages are analyzed by reading the first 32 bytes and comparing with data to be
        programmed.

def _analyze_pages_with_partial_read(self):
        """! @brief Estimate how many pages are the same by reading data.

        Pages are analyzed by reading the first 32 bytes and comparing with data to be
        programmed.
        """
        # Quickly estimate how many pages are the same as current flash contents.
        # Init the flash algo in case it is required in order to access the flash memory.
        self._enable_read_access()
        for page in self.page_list:
            # Analyze pages that haven't been analyzed yet
            if page.same is None:
                size = min(PAGE_ESTIMATE_SIZE, len(page.data))
                data = self.flash.target.read_memory_block8(page.addr, size)
                page_same = same(data, page.data[0:size])
                if page_same is False:
                    page.same = False
                else:
                    # Save the data read for estimation so we don't need to read it again.
                    page.cached_estimate_data = data