Write a script or function to parse large cloud audit logs and flag anomalous access patterns.
Each input line has the format timestamp,user_id,ip,action, with integer timestamps in nondecreasing order. Return the zero-based indices of events where the user has accessed from more than max_unique_ips distinct IP addresses within the inclusive preceding window_seconds interval. Inputs are valid, and the result must preserve log order.
def flag_anomalous_access(log_lines, window_seconds, max_unique_ips):