def METHOD_NAME(self, qtbot, tmp_path, monkeypatch, base_settings):
    widget = LabelEditor(base_settings)
    qtbot.addWidget(widget)
    labels = [[128, 50, 200], [255, 0, 0], [0, 0, 255]]
    widget.set_colors("test", labels)
    target_path = str(tmp_path / "test.json")
    def exec_(self_):
        self_.selectFile(target_path)
        self_.accept()
        return True
    def selected_name_filter(self_):
        return self_.nameFilters()[0]
    def selected_files(self_):
        return [target_path]
    monkeypatch.setattr(QFileDialog, "exec_", exec_)
    monkeypatch.setattr(QFileDialog, "selectedNameFilter", selected_name_filter)
    monkeypatch.setattr(QFileDialog, "selectedFiles", selected_files)
    widget._export_action()
    assert os.path.isfile(target_path)
    widget.set_colors("", [])
    widget._import_action()
    assert widget.get_colors() == labels