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: network_delay.rs
    path of file: ./repos/diem/testsuite/cluster-test/src/effects
    
    the code of the file until where you have to start completion: // Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0

#![forbid(unsafe_code)]

use crate::effects::Effect;
/// NetworkDelay introduces network delay from a given instance to a provided list of instances
/// If no instances are provided, network delay is introduced on all outgoing packets
use crate::instance::Instance;
use anyhow::Result;

use async_trait::async_trait;
use diem_logger::debug;
use std::{fmt, time::Duration};

pub struct NetworkDelay {
    instance: Instance,
    // A vector of a pair of (delay, instance list)
    // Applies delay to each instance in the instance list
    configura
    
    async fn activate(&mut self) -> Result<()> {
        debug!("Injecting NetworkDelays for {}", self.instance);
        let mut command = "".to_string();
        // Create a HTB https://linux.die.net/man/8/tc-htb
        command += "tc qdisc add dev eth0 root handle 1: htb; ";
        for i in 0..self.configuration.len() {
            // Create a class within the HTB https://linux.die.net/man/8/tc
            command += format!(
                "tc class add dev eth0 parent 1: classid 1:{} htb rate 1tbit; ",
                i + 1
            )
            .as_str();
        }
        for i in 0..self.configuration.len() {
            // Create u32 filters so that all the target instances are classified as class 1:(i+1)
            // http://man7.org/linux/man-pages/man8/tc-u32.8.html
            for target_instance in &self.configuration[i].0 {
                command += format!("tc filter add dev eth0 parent 1: protocol ip prio 1 u32 flowid 1:{} match ip dst {}; ", i+1, target_instance.ip()).as_str();
            }
        }
        for i in 0..self.configuration.len() {
            // Use netem to delay packets to this class
            command += format!(
                "tc qdisc add dev eth0 parent 1:{} handle {}0: netem delay {}ms; ",
                i + 1,
                i + 1,
                self.configuration[i].1.as_millis(),
            )
            .as_str();
        }
        self.instance.util_cmd(command, "ac-net-delay").await
    }