def METHOD_NAME(self, cfn):
    """Check CodePipeline stages"""
    matches = []
    resources = cfn.get_resource_properties(["AWS::CodePipeline::Pipeline"])
    for resource in resources:
        path = resource["Path"] + ["Stages"]
        properties = resource["Value"]
        s_stages = cfn.get_object_without_nested_conditions(
            properties.get("Stages"), path
        )
        for s_stage in s_stages:
            s_stage_obj = s_stage.get("Object")
            s_scenario = s_stage.get("Scenario")
            if not isinstance(s_stage_obj, list):
                self.logger.debug(
                    "Stages not list. Should have been caught by generic linting."
                )
                continue
            try:
                matches.extend(
                    self.check_stage_count(s_stage_obj, path, s_scenario)
                )
                matches.extend(
                    self.check_first_stage(s_stage_obj, path, s_scenario)
                )
                matches.extend(
                    self.check_source_actions(s_stage_obj, path, s_scenario)
                )
                matches.extend(
                    self.check_names_unique(s_stage_obj, path, s_scenario)
                )
            except AttributeError as err:
                self.logger.debug(
                    "Got AttributeError. Should have been caught by generic linting. "
                    "Ignoring the error here: %s",
                    str(err),
                )
    return matches