Write a function to calculate the average latency in a series of network requests.
Implement def average_latency(latencies):, where latencies is a non-empty list of non-negative numbers measured in milliseconds. Return the arithmetic mean as a floating-point number. The input list must not be modified.
def average_latency(latencies):