def replace_symbols(
            text,
            form='NFKD',
            excluded=None,
            replacement=''):
        """Replace symbols in text.

        Removes symbols from input text or replaces them with a
        string if specified.

        Args:
            text: The text to be processed.
            form: Unicode form.
            excluded: Set of unicode characters to exclude.
            replacement: New text that will replace symbols.

        Returns:
            The text without symbols.
        """
        if excluded is None:
            excluded = set()

        categories = set(['Mn', 'Sc', 'Sk', 'Sm', 'So'])

        return ''.join(c if unicodedata.category(c) not in categories or c in excluded
                       else replacement for c in unicodedata.normalize(form, text))
Replace symbols in text.

        Removes symbols from input text or replaces them with a
        string if specified.

        Args:
            text: The text to be processed.
            form: Unicode form.
            excluded: Set of unicode characters to exclude.
            replacement: New text that will replace symbols.

        Returns:
            The text without symbols.