docs: def _transition(self, nxt, cur=None, since=None):
          '''
          Register that a transition has taken place.
          nxt is an identifier for the state being entered.
          cur is an identifier for the state being left.
          since is the time at which the previous state was entered.
          '''
          self.transition_intervals[(cur, nxt)].tick()
          if since:
              self.state_durations[cur].end(since)