<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _clean_result(self, text):
 """Remove double spaces, punctuation and escapes apostrophes."""

        text = re.sub('\s\s+', ' ', text)
        text = re.sub('\.\.+', '.', text)
        text = text.replace("'", "\\'")
        return text