Complete the code to start measuring latency before a step.
start_time = [1]()Use time.time() to get the current time in seconds since the epoch, which is useful for latency measurement.
Complete the code to calculate latency after a step finishes.
latency = [1]() - start_timeUse time.time() again to get the current time and subtract the start time to find latency.
Fix the error in the code to correctly measure latency for a step.
end_time = time.time()
latency = end_time - [1]The variable storing the start time is start_time. Using the exact variable name is important.
Fill both blanks to create a dictionary that stores latency per step name.
latency_per_step = { [1]: [2] }The dictionary key should be the step name as a string, and the value should be the latency variable.
Fill all three blanks to update latency for a step in a monitoring dictionary.
latency_per_step[[1]] = [2] - [3]
Use the step name as the key, and calculate latency by subtracting start time from end time.
