code: def replace_punctuation(
      s: TextSeries, symbol: str = " "
  ) -> TextSeries:
      """
      Replace all punctuation with a given symbol.
  
      Replace all punctuation from the given
      Pandas Series with a custom symbol.
      It considers as punctuation characters all :data:`string.punctuation`
      symbols `!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~).`
  
  
      Parameters
      ----------
      s : :class:`texthero._types.TextSeries`
  
      symbol : str, optional, default=" "
          Symbol to use as replacement for all string punctuation.
  
      Examples
      --------
      >>> import texthero as hero
      >>> import pandas as pd
      >>> s = pd.Series("Finnaly.")
      >>> hero.replace_punctuation(s, " <PUNCT> ")
      0    Finnaly <PUNCT>
      dtype: object
      """
  
      return s.str.replace(rf"([{string.punctuation}])+", symbol)
  
imports: from gensim.models.phrases import Phrases
  import re
  import string
  from typing import Optional, Set
  import unicodedata
  import numpy
  import pandas
  from texthero._types import TokenSeries, TextSeries, InputSeries
  from typing import List, Callable, Union
  import warnings
label_desc: Use image node_id 5 for calling a global function with example usage: replace_punctuation(s, symbol) and returns: s