Extracted process_sources from task_arg_gen