code: def _build(task_list):
      tasks = {}
      tags = defaultdict(list)
  
      for t in task_list:
          task = _preprocess(t["id"])
          tasks[task] = [t]
          for j in t["tags"]:
              tag = _preprocess(j)
              if tag in tasks:
                  raise RuntimeError(
                      "tag " + tag + " is the same as a task name"
                  )
              tags[tag].append(t)
      return tasks, tags
  
imports: from .task_list import task_list
  from collections import defaultdict
label_desc: Use image node_id 2 for calling a global function with example usage: _build(task_list) and returns: tasks,  tags