def METHOD_NAME(self, parent_last_N_headerhashes, last_headerhash: bytes):
    del self._data.last_N_headerhashes[:]
    self._data.last_N_headerhashes.extend(parent_last_N_headerhashes)
    self._data.last_N_headerhashes.append(last_headerhash)
    if len(self._data.last_N_headerhashes) > config.dev.N_measurement:
        del self._data.last_N_headerhashes[0]
    if len(self._data.last_N_headerhashes) > config.dev.N_measurement:
        raise Exception('Size of last_N_headerhashes is more than expected %s %s',
                        len(self._data.last_N_headerhashes),
                        config.dev.N_measurement)