fix generator for python2, m -> medium