<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_sessions(self) -> List[Session]: """List all the active sessions in Livy."""

        data = self._client.get("/sessions")
        return [Session.from_json(item) for item in data["sessions"]]