Compute latency metrics for one token stream using timestamps in seconds. Return {"ttft": first token time minus arrival_time, "itl": consecutive token-time differences, "tpot": mean inter-token latency}.
With zero tokens, ttft and tpot are null (Python None) and itl is []. With one token, ttft is defined but tpot remains null. Coincident token timestamps produce zero intervals. TTFT is excluded from TPOT.
def stream_latencies(arrival_time, token_times):
Constraints
0..64 finite token times in nondecreasing order, each ≥ arrival_time.
arrival_time is finite and nonnegative; all timestamps are at most 100000.
Inputs satisfy these constraints; invalid-input handling is not graded. Use only Python standard library and NumPy.