'Do the actual transform on the given text.'

def _transform(self, text):

    global UNIDECODE_ALERT_RAISED
    if self._convert_to_ascii:
        try:
            import unidecode
            text = unidecode.unidecode(text)
        except Exception:
            if (UNIDECODE_ALERT_RAISED == False):
                UNIDECODE_ALERT_RAISED = True
                sys.stderr.write('Please    install    unidecode    python    package    in    order    to    be    able    to    make    ascii    conversions.\n')
    if (self._find is None):
        return text
    return self._find.subn(self._replace.replace, text, self._match_this_many)[0]
