code: def build_task(config):
      """Builds a ClassyTask from a config.
  
      This assumes a 'name' key in the config which is used to determine what
      task class to instantiate. For instance, a config `{"name": "my_task",
      "foo": "bar"}` will find a class that was registered as "my_task"
      (see :func:`register_task`) and call .from_config on it."""
  
      task = TASK_REGISTRY[config["name"]].from_config(config)
  
      return task
  
file_path: ClassyVision/classy_vision/tasks/__init__.py
imports: import traceback
  from pathlib import Path
  from classy_vision.generic.registry_utils import import_all_modules
  from .classy_task import ClassyTask
  from .classification_task import ClassificationTask
  from .fine_tuning_task import FineTuningTask
label_desc: Use image node_id 1 for calling a global function with example usage: build_task(config) and returns: task