def METHOD_NAME(self) -> None:
    if self._filter_box.isHidden():
        # Activate filtering and show the text field.
        self._filter_button.setIcon(read_QIcon("icons8-clear-filters-32-windows.png"))
        self._filter_box.show()
        self.removeItem(self._stretch_item)
        self._filter_box.setFocus(1)
    else:
        self.addItem(self._stretch_item)
        # Deactivate filtering and hide the text field.
        self._filter_button.setIcon(read_QIcon("icons8-filter-edit-32-windows.png"))
        self._filter_box.setText('')
        self._filter_box.hide()
        self.filter_signal.emit('')