def METHOD_NAME(self):
    source_model = self.sourceModel()
    if source_model is None:
        return
    source_model.dataChanged.connect(self._source_data_changed)
    source_model.rowsAboutToBeInserted.connect(
        self._source_rows_about_to_be_inserted
    )
    source_model.rowsInserted.connect(self._source_rows_inserted)
    source_model.modelAboutToBeReset.connect(self.modelAboutToBeReset)
    source_model.modelReset.connect(self.modelReset)