Please describe the following parts, out of an Python code for a Stop-and-Wait protocol with retransmission, being used on a Jupyter Notebook and being aided by the ipywidgets libraries, in here the code will be available: https://colab.research.google.com/drive/1MXy8PXf3tN7Dgxebtjt8RCAkL9i0UvbR?usp=sharing Describe: a. The layer model (Use a figure to illustrate entities on all layers) b. All states c. All events d. The state transition (Use a figure to illustrate the state transition diagram) e. Design of the constructor (constructor: import time import ipywidgets as widgets class MLE_TR: def __init__(self, lower_layer): self.lower_layer = lower_layer self.button = widgets.Button(description='Send 100 messages') self.button.on_click(self.callback) def callback(self, button): print('Sending 100 messages...') for i in range(100): message = f'Experiment ID: {random.randint(1, 10)}, Message ID: {i}, Current Time: {time.time_ns()}' self.lower_layer.send(message) ) f. Design of the loop_Rx function (loop_Rx: def loop_Rx(self): num_messages = 0 total_delay = 0 num_loss = 0 num_duplication = 0 while True: message = self.lower_layer.receive() if message is None: continue num_messages += 1 experiment_id, message_id, timestamp = message.split(', ') experiment_id = int(experiment_id.split(': ')[1]) message_id = int(message_id.split(': ')[1]) timestamp = float(timestamp.split(': ')[1]) delay = time.time() - timestamp total_delay += delay if random.random() < 0.1: num_loss += 1 continue if random.random() < 0.05: num_duplication += 1 self.lower_layer.send(message) print(f'Received message: {message}') avg_delay = total_delay / num_messages loss_rate = num_loss / num_messages duplication_rate = num_duplication / num_messages print(f'Average delay: {avg_delay}, Loss rate: {loss_rate}, Duplication rate: {duplication_rate}') ) g. Design a method to generate measurement output (The only part that is not a describe only, need to implement as well, you will need to specify when the output shall be generated because the lower layer can be unreliable).