To avoid calculating the length of <code>versions</code>, <code>versions[-1]</code> can be used instead.