@staticmethod<EOL><INDENT>def _compile_models(models):<DEDENT>
tasklist = []<EOL>for m in models:<EOL><INDENT>if isinstance(m, MultiFitterModel):<EOL><INDENT>tasklist += [('<STR_LIT>', [m])]<EOL>tasklist += [('<STR_LIT>', None)]<EOL><DEDENT>elif hasattr(m, '<STR_LIT>'):<EOL><INDENT>tasklist += [('<STR_LIT>', m)]<EOL><DEDENT>elif isinstance(m, tuple):<EOL><INDENT>tasklist += [('<STR_LIT>', list(m))]<EOL>tasklist += [('<STR_LIT>', None)]<EOL><DEDENT>elif isinstance(m, list):<EOL><INDENT>for sm in m:<EOL><INDENT>if isinstance(sm, MultiFitterModel):<EOL><INDENT>tasklist += [('<STR_LIT>', [sm])]<EOL><DEDENT>elif isinstance(sm, tuple):<EOL><INDENT>tasklist += [('<STR_LIT>', list(sm))]<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'.format(<EOL>str(type(sm))<EOL>)<EOL>)<EOL><DEDENT><DEDENT>tasklist += [('<STR_LIT>', len(m))]<EOL>tasklist += [('<STR_LIT>', None)]<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT><DEDENT>return tasklist<EOL>
Convert ``models`` into a list of tasks.

        Each task is tuple ``(name, data)`` where ``name`` indicates the task
        task and ``data`` is the relevant data for that task.

        Supported tasks and data:

            - ``'fit'`` and list of models
            -  ``'update-kargs'`` and ``None``
            - ``'update-prior'`` and ``None``
            - ``'wavg'`` and number of (previous) fits to average