def remove_document_ids(self,
                            document_ids: List[int],
                            remove_unused_terms: bool = True,
                            remove_unused_metadata: bool = False) -> Self:
        '''

        :param document_ids: List[int], list of document ids to remove
        :return: Corpus
        '''
        y_mask = ~np.isin(np.arange(self.get_num_docs()), np.array(document_ids))
        updated_tdm = self._make_new_term_doc_matrix(
            new_X=self._X,
            new_mX=self._mX,
            new_y=None,
            new_category_idx_store=None,
            new_term_idx_store=self._term_idx_store,
            new_metadata_idx_store=self._metadata_idx_store,
            new_y_mask=y_mask
        )

        if remove_unused_terms:
            unused_term_idx = np.where(self._X[y_mask, :].sum(axis=0) == 0)[1]
            updated_tdm = updated_tdm.remove_terms_by_indices(unused_term_idx, non_text=False)

        if remove_unused_metadata:
            unused_metadata_mask = np.mask(self._mX[y_mask, :].sum(axis=0) == 0)[0]
            updated_tdm = updated_tdm.remove_terms_by_indices(unused_metadata_mask, non_text=True)

        return updated_tdm


        :param document_ids: List[int], list of document ids to remove
        :return: Corpus
        
scattertext/TermDocMatrixWithoutCategories.py