def METHOD_NAME(self, stages, path, scenario):
    """Validate the first stage of a pipeline has source actions."""
    matches = []
    if len(stages) < 1:  # pylint: disable=C1801
        self.logger.debug(
            "Stages was empty. Should have been caught by generic linting."
        )
        return matches
    # pylint: disable=R1718
    first_stage = set(
        [a.get("ActionTypeId").get("Category") for a in stages[0]["Actions"]]
    )
    if first_stage and "Source" not in first_stage:
        message = (
            "The first stage of a pipeline must contain at least one source action."
        )
        matches.append(
            RuleMatch(
                path + [0, "Name"], self._format_error_message(message, scenario)
            )
        )
    if len(first_stage) != 1:
        message = "The first stage of a pipeline must contain only source actions."
        matches.append(
            RuleMatch(
                path + [0, "Name"], self._format_error_message(message, scenario)
            )
        )
    return matches