def METHOD_NAME(
    self,
    context: CCT,
    update: Update,  # skipcq: BAN-B301
    application: "Application[Any, CCT, Any, Any, Any, Any]",  # skipcq: BAN-B301
    check_result: Union[bool, Match[str]],
) -> None:
    """This function adds the matched regex pattern result to
    :attr:`telegram.ext.CallbackContext.matches`.
    """
    if self.pattern:
        check_result = cast(Match, check_result)
        context.matches = [check_result]