def METHOD_NAME(self, open_token: str, close_token: str) -> Iterator[bool]:
    if self.check(open_token):
        open_position = self.position
        self.read()
    else:
        open_position = None
    yield open_position is not None
    if open_position is None:
        return
    if not self.check(close_token):
        self.raise_syntax_error(
            f"Expected closing {close_token}",
            span_start=open_position,
        )
    self.read()