code: def punctuation_error_rate(
      references: list[str],
      hypotheses: list[str],
      punctuation_marks: list[str],
      punctuation_mask: str = "[PUNCT]",
  ) -> None:
      """
      Computes Punctuation Error Rate
  
      Args:
          references (list[str]) - list of references
          hypotheses (list[str]) - list of hypotheses
          punctuation_marks (list[str]) - list of punctuation marks for computing metrics
          punctuation_mask (str, by default "[PUNCT]") - mask token that will be applied to
          given punctuation marks while edit distance calculation
  
      Return:
          punct_er (float) - Punctuation Error Rate
      """
  
      dper_obj = DatasetPunctuationErrorRate(
          references=references,
          hypotheses=hypotheses,
          punctuation_marks=punctuation_marks,
          punctuation_mask=punctuation_mask,
      )
  
      dper_obj.compute()
  
      return dper_obj.punct_er
  
file_path: NeMo/nemo/collections/common/metrics/punct_er.py
imports: import re
  from collections import namedtuple
  from tqdm import tqdm
  from nemo.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: punctuation_error_rate(references, hypotheses, punctuation_marks, punctuation_mask) and returns: dper_obj