<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stem(self, word):
 """Perform stemming on an input word."""

        if self.stemmer:
            return unicode_to_ascii(self._stemmer.stem(word))
        else:
            return word