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