def decompress(self, value):
        u"""
        Receives an instance of `MultiLingualText` (or a properly-formatted
        block of XML) and returns a list of values corresponding in position
        to the current ordering of settings.LANGUAGES.
        """
        text_dict = {}
        if value:
            # Both MultiLingualCharField and MultiLingualTextField instances
            # provide `MultiLingualText` instances by default but handling
            # for raw XML has been included for convenience.
            if isinstance(value, datastructures.MultiLingualText):
                text_dict = dict(
                    (code, getattr(value, code))
                    for code, verbose in LANGUAGES
                )
            else:
                # Converting XML (passed-in as `value`) to a python object
                # via lxml
                try:
                    xml_as_python_object = objectify.fromstring(value)
                except XMLSyntaxError:
                    raise Exception(
                        '%s MultiLingualTextFieldWidget.decompress()!' %
                        INVALID_XML_ERROR
                    )
                else:
                    # Creating a dictionary of all the languages passed in the
                    # value XML with the language code (i.e. 'en', 'de', 'fr')
                    # as the key
                    text_dict = dict(
                        (unicode(l.code), unicode(l.language_text or u''))
                        for l in xml_as_python_object.language
                    )
        # Returning text from XML tree in order dictated by LANGUAGES
        return [text_dict.get(code, u'') for code, verbose in LANGUAGES]
dataset/ETHPy150Open WGBH/django-multilingualfield/multilingualfield/widgets.py/MultiLingualTextFieldWidget.decompress/original