def _copy_index(self, index_name: str, index_copy_name: str) -> None:
    if (not index_copy_name):
        index_copy_name = (index_name + '_copy')
    self.logger.debug(f'Copying the index {index_name} to {index_copy_name}')
    self.logger.debug(f'First, marking the index {index_name} as read-only')
    self._update_index_setting(index_name, {'settings': {'index.blocks.write': True}})
    self.logger.debug(f'Second, deleting the index {index_copy_name}, if exists')
    self._delete_index(index_copy_name)
    self.logger.debug(f'Third, cloning the index {index_name} as {index_copy_name}')
    self._clone_index(index_name, index_copy_name)
    self.logger.debug(f'Fourth, unmarking the index {index_name} as read-only')
    self._update_index_setting(index_name, {'settings': {'index.blocks.write': False}})
    self.logger.debug(f'Fifth, also unmarking the index {index_copy_name} as read-only')
    self._update_index_setting(index_copy_name, {'settings': {'index.blocks.write': False}})
    return None
def _copy_index(self, index_name: str, index_copy_name: str) -> None:
    if (not index_copy_name):
        index_copy_name = (index_name + '_copy')
    self.logger.debug(f'Copying the index {index_name} to {index_copy_name}')
    self.logger.debug(f'First, marking the index {index_name} as read-only')
    self._update_index_setting(index_name, {'settings': {'index.blocks.write': True}})
    self.logger.debug(f'Second, deleting the index {index_copy_name}, if exists')
    self._delete_index(index_copy_name)
    self.logger.debug(f'Third, cloning the index {index_name} as {index_copy_name}')
    self._clone_index(index_name, index_copy_name)
    self.logger.debug(f'Fourth, unmarking the index {index_name} as read-only')
    self._update_index_setting(index_name, {'settings': {'index.blocks.write': False}})
    self.logger.debug(f'Fifth, also unmarking the index {index_copy_name} as read-only')
    self._update_index_setting(index_copy_name, {'settings': {'index.blocks.write': False}})
    return None