You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: parallel.rs
    path of file: ./repos/pueue/pueue/src/daemon/network/message_handler
    
    the code of the file until where you have to start completion: use pueue_lib::network::message::*;
use pueue_lib::state::SharedState;

use crate::daemon::network::response_helper::*;

/// Set the parallel tasks for a specific group.
pub fn set_parallel_tasks(messa
    
pub fn set_parallel_tasks(message: ParallelMessage, state: &SharedState) -> Message {
    let mut state = state.lock().unwrap();
    let group = match ensure_group_exists(&mut state, &message.group) {
        Ok(group) => group,
        Err(message) => return message,
    };

    group.parallel_tasks = message.parallel_tasks;

    create_success_message(format!(
        "Parallel tasks setting for group \"{}\" adjusted",
        &message.group
    ))
}