def METHOD_NAME(self, value, path, scenario):
    """Check that stage names are unique."""
    matches = []
    stage_names = set()
    for sidx, stage in enumerate(value):
        stage_name = stage.get("Name")
        if isinstance(stage_name, str):
            if stage_name in stage_names:
                message = f"All stage names within a pipeline must be unique. ({stage_name})"
                matches.append(
                    RuleMatch(
                        path + [sidx, "Name"],
                        self._format_error_message(message, scenario),
                    )
                )
            stage_names.add(stage_name)
        else:
            self.logger.debug("Found non string for stage name: %s", stage_name)
    return matches