Graphs, random sums, and sojourn time distributions, with application to ion-channel modeling.