EA SPORTS FC gameplay telemetry contains one record for each completed user session. Write a function that calculates the average session duration across all provided sessions.
Each session is represented by a dictionary containing a user_id, start, and end. The start and end values are integer timestamps measured in minutes from a common reference point. The average should include every session, regardless of whether multiple sessions belong to the same user.
Return 0.0 when the input contains no sessions.
Implement average_session_duration(sessions).
sessions, a list of dictionaries. Each dictionary has:
user_id: a stringstart: an integer start timestampend: an integer end timestampend - start for all sessions.def average_session_duration(sessions):