def METHOD_NAME(self, preds: Union[str, List[str]], target: Union[str, List[str]]) -> None:
    """Update state with predictions and targets."""
    errors, total = _wer_update(preds, target)
    self.errors += errors
    self.total += total