import re


def remove_pii_ssn(text: str, replacement: str = '--SSN--') -> str:
    """
    Pass a string and return the text string with SSN numbers removed

    Parameters
    ----------
    text : str
        The text to replace SSN numbers in
    replacement : str
        The text to replace SSN numbers with

    Returns
    -------
    replacement_text: str
        A text string with the SSN numbers removed and
        replaced with specified text

    Example
    -------
    text_with_ssn = "My social security number is 123-45-6789"

    print(remove_pii_ssn(text_with_ssn))

    > My social security number is --SSN--
    """
    ssn_regex_pattern = re.compile(
        r'(?P<area>[0-9]{3})-?(?P<group>[0-9]{2})-?(?P<serial>[0-9]{4})'
    )

    replacement_text = re.sub(ssn_regex_pattern, replacement, text)
    return replacement_text