Consider the code:
import simpy
import random

# Parameters
num_edge_nodes = 3
buffer_size = 10
cloud_server_processing_time = 10
avg_priority_a_processing_time = 1
avg_priority_b_processing_time = 3
propagation_delay = 2
arrival_rate =  10


# Measurements
class Measure:
    def __init__(self, N_arr_a, N_arr_b, drop):
        self.N_arr_A = N_arr_a
        self.N_arr_B = N_arr_b
        self.drop = drop
data_class = Measure(0,0,0)

def packet_arrivals(env, micro_data_center, cloud_data_center, data):
    packet_type_options = ['A', 'B']
    packet_id = 1

    while True:
        packet_type = random.choices(packet_type_options, weights=(1-f, f))[0]
        packet_processing_time = avg_priority_a_processing_time if packet_type == 'A' else avg_priority_b_processing_time
        # Updating arrival data
        if packet_type == "A":
            data.N_arr_A = data.N_arr_A + 1
        else:
            data.N_arr_B = data.N_arr_B + 1


        if len(micro_data_center.items) < buffer_size:
            micro_data_center.put((packet_id, packet_type, packet_processing_time))
        else:
            cloud_data_center.put((packet_id, packet_type, packet_processing_time + cloud_server_processing_time))
            # Updating arrival data when a packet cannot get processed by the edge server due to heavy load
            data.drop  = data.drop + 1


        yield env.timeout(random.expovariate(arrival_rate))
        packet_id += 1


def edge_node(env, micro_data_center, cloud_data_center, node_id):
    while True:
        packet_id, packet_type, packet_processing_time = yield micro_data_center.get()

        yield env.timeout(packet_processing_time)
        print(f"Edge Node {node_id} processed packet {packet_id} of type {packet_type} at time {env.now}")

        if packet_type == 'B':
            yield cloud_data_center.put((packet_id, packet_type, cloud_server_processing_time + propagation_delay))

def cloud_server(env, cloud_data_center):
    while True:
        packet_id, packet_type, packet_processing_time = yield cloud_data_center.get()

        yield env.timeout(packet_processing_time)
        print(f"Cloud Server processed {packet_type} packet {packet_id} (including propagation delay) at time {env.now}")

# Simulation setup
env = simpy.Environment()
micro_data_center = simpy.Store(env)
cloud_data_center = simpy.Store(env)

f = 0.5  # Fraction of packets of type B

env.process(packet_arrivals(env, micro_data_center, cloud_data_center, data_class))

for node_id in range(num_edge_nodes):
    env.process(edge_node(env, micro_data_center, cloud_data_center, node_id+1))

env.process(cloud_server(env, cloud_data_center))


# Recording data


# Run the simulation
simulation_time = 100
env.run(until=simulation_time)



print("Number of arrived A :", data_class.N_arr_A , "\nNumber of arrived B :", data_class.N_arr_B )
print("Skipped packets by nodes :", data_class.drop )

Modify the the code above to perfirm the following task:
Tasks
1. For the first task, assume a single server with finite buffer for both the Micro Data
Center and the Cloud Data Center, with f=0.5. Focusing on the Cloud Data Center
sub-system, the packet drop probabil-ity (version B) of those data packets that are
forwarded to the Cloud for any reason.
(a) Observe the system behavior during the warm-up transient period and identify
the transition to the steady state.
(b) Try to apply a method to remove the warm-up transient in your simulations.