def validate_scenario_subsets(self, ctx, scenario):
        """
        Validates the subsets in a scenario and compiles basic changes.
        1. For view scenarios, check if the views exist in the dataset.
        2. For sample_field and label_attribute scenarios, check if the field exists in the dataset.
            - If the field is tags, check if the tags exist.

        returns the validated scenario and a list of changes.
        If the scenario is not valid, it will return an empty list of subsets.
        If the scenario is valid, it will return the original scenario with the validated subsets.
        """
        scenario_type = scenario.get("type", None)
        changes = []

        if scenario_type == "view":
            subset_views = scenario.get("subsets", [])
            dataset_views = ctx.dataset.list_saved_views()
            available_subsets = [v for v in subset_views if v in dataset_views]
            unavailable_subsets = [
                v for v in subset_views if v not in dataset_views
            ]

            if unavailable_subsets:
                unavailable = "\n- ".join(unavailable_subsets)
                changes.append(
                    {
                        "label": f"The following views are not available anymore. To continue your analysis, you can edit this scenario.",
                        "description": f"- {unavailable}",
                    }
                )

            scenario["subsets"] = available_subsets
        elif scenario_type in ["sample_field", "label_attribute"]:
            scenario_field = scenario.get("field", None)
            dataset_field_paths = ctx.dataset.get_field_schema(
                flat=True
            ).keys()

            # if the exact field does not exist, set subsets to empty
            if not scenario_field or scenario_field not in dataset_field_paths:
                changes.append(
                    {
                        "label": f"The following field does not exists. To continue your analysis, you can edit this scenario.",
                        "description": f"{scenario_field}",
                    }
                )
                scenario["subsets"] = []

            # if field exists, it is tags, but tag doesn't exist
            if scenario_field and scenario_field == "tags":
                all_tags = ctx.dataset.distinct("tags")
                tags = scenario.get("subsets", [])
                available_tags = [t for t in tags if t in all_tags]
                missing_tags = list(set(tags) - set(available_tags))

                if missing_tags:
                    the_tags = "\n- ".join(missing_tags)
                    changes.append(
                        {
                            "label": f"The following tags do not exists. To continue your analysis, you can edit this scenario.",
                            "description": f"- {the_tags}",
                        }
                    )
                    if len(available_tags) == 0:
                        scenario["subsets"] = []

        return scenario, changes

        Validates the subsets in a scenario and compiles basic changes.
        1. For view scenarios, check if the views exist in the dataset.
        2. For sample_field and label_attribute scenarios, check if the field exists in the dataset.
            - If the field is tags, check if the tags exist.

        returns the validated scenario and a list of changes.
        If the scenario is not valid, it will return an empty list of subsets.
        If the scenario is valid, it will return the original scenario with the validated subsets.
        
plugins/panels/model_evaluation/__init__.py