<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extract_plain_text(self, reduce: bool = False) -> str: """ Extract text segments from the message, joined by single space. :param reduce: reduce the message before extracting :return: the joined string """

        if reduce:
            self.reduce()

        result = ''
        for seg in self:
            if seg.type == 'text':
                result += ' ' + seg.data['text']
        if result:
            result = result[1:]
        return result