    def config_task(cls, config):
        """
        determine whether to load a hard-coded task or config from a generic one.
        via if a task string is available in config.
        """
        if config.task is not None:
            # TODO (huxu): expand the search scope.
            task_cls = getattr(tasks, config.task)
            return task_cls(config)
        else:
            return Task(config)
determine whether to load a hard-coded task or config from a generic one.
via if a task string is available in config.
examples/MMPT/mmpt/tasks/task.py