def populate(self, struct):
        """Generates the list tree.
        struct: if a list/set/tuple is given, a flat list is generated
        <*l><li>v1</li><li>v2</li>...</*l>
        If the list type is 'Dl' a flat list without definitions is generated
        <*l><dt>v1</dt><dt>v2</dt>...</*l>

        If the given struct is a dict, key contaninct lists/tuples/sets/dicts
        will be transformed in nested lists, and so on recursively, using dict
        keys as list items, and dict values as sublists. If type is 'Dl' each
        value will be transformed in definition (or list of definitions)
        except others dict. In that case, it will be transformed in <dfn> tags.

        >>> struct = {'ele1': None, 'ele2': ['sub21', 'sub22'], 'ele3': {'sub31': None, 'sub32': None, '_typ': 'Ol'}}
        >>> TempyList(struct=struct)
        <ul>
            <li>ele1</li>
            <li>ele2
                <ul>
                    <li>sub21</li>
                    <li>sub22</li>
                </ul>
            </li>
            <li>ele3
                <ol>
                    <li>sub31</li>
                    <li>sub32</li>
                </ol>
            </li>
        </ul>
        """

        if struct is None:
            # Maybe raise? Empty the list?
            return self

        if isinstance(struct, (list, set, tuple)):
            struct = dict(zip_longest(struct, [None]))
        if not isinstance(struct, dict):
            raise WidgetDataError(
                self,
                "List Input not managed, expected (dict, list), got %s" % type(struct),
            )
        else:
            if self._typ == Dl:
                self.__process_dl_struct(struct)
            else:
                self.__process_li_struct(struct)

        return self