def METHOD_NAME(
    self,
    context: CCT,
    update: Update,  # skipcq: BAN-B301
    application: "Application[Any, CCT, Any, Any, Any, Any]",  # skipcq: BAN-B301
    check_result: Optional[Union[bool, Match[str]]],
) -> None:
    """Add the result of ``re.match(pattern, update.inline_query.query)`` to
    :attr:`CallbackContext.matches` as list with one element.
    """
    if self.pattern:
        check_result = cast(Match, check_result)
        context.matches = [check_result]