def METHOD_NAME(self, idx: int, fn: str, clear_other_slots=True):
    try:
        if clear_other_slots:
            for i in range(0, SUBENTRIES):
                self.kao.delete(idx, i)
        for subindex, image in SpriteBotSheet.load(fn, self.get_portrait_name):
            try:
                self.kao.set_from_img(idx, subindex, image)
            except Exception as err:
                name = self.get_portrait_name(subindex)
                logger.error(f"Failed importing image '{name}'.", exc_info=err)
                display_error(
                    sys.exc_info(),
                    f(_('Failed importing image "{name}":\n{err}')),
                    f(_("Error for '{name}'."))
                )
    except Exception as err:
        logger.error(f"Failed importing portraits sheet: {err}", exc_info=err)
        display_error(
            sys.exc_info(),
            f(_('Failed importing portraits sheet:\n{err}')),
            _("Could not import.")
        )
    # Mark as modified
    self.mark_as_modified()