code: def _get_words_and_punctuation(sentence: str) -> List[str]:
      """Separates out punctuations from beginning and end of words for chrF for all words in the sentence.
  
      Args:
          sentence: An input sentence to split
  
      Return:
          An aggregated list of separated words and punctuations.
  
      """
      return sum(
          (
              _separate_word_and_punctuation(word)
              for word in sentence.strip().split()
          ),
          [],
      )
  
file_path: torchmetrics/src/torchmetrics/functional/text/chrf.py
imports: from collections import defaultdict
  from typing import Dict, List, Optional, Sequence, Tuple, Union
  import torch
  from torch import Tensor, tensor
  from torchmetrics.functional.text.helper import _validate_inputs
label_desc: Use image node_id 4 for calling a global function with example usage: _get_words_and_punctuation(sentence) and returns: sum