code: def _word_info_lost_update(
      preds: Union[str, List[str]],
      target: Union[str, List[str]],
  ) -> Tuple[Tensor, Tensor, Tensor]:
      """Update the WIL score with the current set of references and predictions.
  
      Args:
          preds: Transcription(s) to score as a string or list of strings
          target: Reference(s) for each speech input as a string or list of strings
  
      Returns:
          Number of edit operations to get from the reference to the prediction, summed over all samples
          Number of words overall references
          Number of words overall predictions
  
      """
      if isinstance(preds, str):
          preds = [preds]
      if isinstance(target, str):
          target = [target]
      total = tensor(0.0)
      errors = tensor(0.0)
      target_total = tensor(0.0)
      preds_total = tensor(0.0)
      for pred, tgt in zip(preds, target):
          pred_tokens = pred.split()
          target_tokens = tgt.split()
          errors += _edit_distance(pred_tokens, target_tokens)
          target_total += len(target_tokens)
          preds_total += len(pred_tokens)
          total += max(len(target_tokens), len(pred_tokens))
  
      return errors - total, target_total, preds_total
  
imports: from typing import List, Tuple, Union
  from torch import Tensor, tensor
  from torchmetrics.functional.text.helper import _edit_distance
label_desc: Use image node_id 1 for calling a global function with example usage: _word_info_lost_update(preds, target) and returns: unknown,  target_total,  preds_total