def _days_to_next_order(avg_latency, std_latency, recency):
    """Estimate the number of days to a customer's next order using latency.

    Args:
        avg_latency (float): Average latency in days
        std_latency (float): Standard deviation of latency in days
        recency (float): Recency in days
    Returns:
        Approximate number of days until the next order.
    """

    return avg_latency - (recency - std_latency)