def METHOD_NAME(self, context: RuleContext) -> Optional[LintResult]:
    """Find rule violations and provide fixes."""
    # Config type hints
    self.prefer_count_0: bool
    self.prefer_count_1: bool
    # We already know we're in a function because of the crawl_behaviour.
    # This means it's very unlikely that there isn't a function_name here.
    function_name = context.segment.get_child("function_name")
    if not function_name:  # pragma: no cover
        return None
    if function_name.raw_upper == "COUNT":
        # Get bracketed content
        f_content = (
            FunctionalContext(context)
            .segment.children(sp.is_type("bracketed"))
            .children(
                sp.and_(
                    sp.not_(sp.is_meta()),
                    sp.not_(
                        sp.is_type(
                            "start_bracket", "end_bracket", "whitespace", "newline"
                        )
                    ),
                )
            )
        )
        if len(f_content) != 1:  # pragma: no cover
            return None
        preferred = "*"
        if self.prefer_count_1:
            preferred = "1"
        elif self.prefer_count_0:
            preferred = "0"
        if f_content[0].is_type("star") and (
            self.prefer_count_1 or self.prefer_count_0
        ):
            return LintResult(
                anchor=context.segment,
                fixes=[
                    LintFix.replace(
                        f_content[0],
                        [
                            f_content[0].edit(
                                f_content[0].raw.replace("*", preferred)
                            )
                        ],
                    ),
                ],
            )
        if f_content[0].is_type("expression"):
            expression_content = [
                seg for seg in f_content[0].segments if not seg.is_meta
            ]
            if (
                len(expression_content) == 1
                and expression_content[0].is_type("literal")
                and expression_content[0].raw in ["0", "1"]
                and expression_content[0].raw != preferred
            ):
                return LintResult(
                    anchor=context.segment,
                    fixes=[
                        LintFix.replace(
                            expression_content[0],
                            [
                                expression_content[0].edit(
                                    expression_content[0].raw.replace(
                                        expression_content[0].raw, preferred
                                    )
                                ),
                            ],
                        ),
                    ],
                )
    return None