code: def set_task_components(self, components: Sequence[TaskComponent]):
      task_components = defaultdict(list)
      # example: task_components['detect'] = (LabelsComponent, BBoxesComponent, ...)
      for component in components:
          task_components[component.task].append(component)
  
      self.task_composites = OrderedDict()
      for task, components in sorted(
          task_components.items(), key=lambda o: o[0].order
      ):
          self.task_composites[task.name] = composite = Composite()
          composite.add_components(components)
          if task != tasks.common:
              composite.set_parent(self)
  
imports: from icevision.imports import *
  from icevision.core import tasks
label_desc: Use image node_id 5 for calling the TaskComposite obj's underlying member method code with example usage: obj.set_task_components(components) without return types