Implement a function that calculates the P50, P95, and P99 latency percentiles from a list of latency measurements. These percentiles are critical metrics for monitoring system performance, API response times, and model inference latencies in production ML systems.
The function should take a list of latency values (in milliseconds or any time unit) and return a dictionary containing the 50th, 95th, and 99th percentile values, each rounded to 4 decimal places.
Specifications: