def METHOD_NAME(self, fragment: Fragment) -> str:
    if not isinstance(fragment, str):
        raise ValidationError(f"expected text fragment but received binary fragment for {self._current_consumer.__name__}")
    return fragment