code: def create_options_model(self, taskfileinfos):
          
          rootdata = ListItemData(["Asset/Shot", "Task", "Descriptor", "Version", "Releasetype"])
          rootitem = TreeItem(rootdata)
          tasks = defaultdict(list)
          for tfi in taskfileinfos:
              tasks[tfi.task].append(tfi)
          for task in reversed(sorted(tasks.keys(), key=lambda t: t.department.ordervalue)):
              tfis = tasks[task]
              taskdata = djitemdata.TaskItemData(task)
              taskitem = TreeItem(taskdata, rootitem)
              for tfi in reversed(tfis):
                  tfidata = TaskFileInfoItemData(tfi)
                  TreeItem(tfidata, taskitem)
          return TreeModel(rootitem)
docs: Create a new treemodel that has the taskfileinfos as internal_data of the leaves.
  
          I recommend using :class:`jukeboxcore.gui.filesysitemdata.TaskFileInfoItemData` for the leaves.
          So a valid root item would be something like::
  
            rootdata = jukeboxcore.gui.treemodel.ListItemData(["Asset/Shot", "Task", "Descriptor", "Version", "Releasetype"])
            rootitem = jukeboxcore.gui.treemodel.TreeItem(rootdata)
  
          :returns: the option model with :class:`TaskFileInfo` as internal_data of the leaves.
          :rtype: :class:`jukeboxcore.gui.treemodel.TreeModel`
          :raises: None