import re
import string


def rm_punct(text: str):

    """
    Removes punctuation from text as part of text preprocessing pipeline.
    """

    punct = re.escape(string.punctuation)
    text = re.sub(f"[{punct}]", " ", text)
    text = re.sub(f" +", " ", text)
    return text