def naturalsort(iterable, key=None):
    locale.setlocale(locale.LC_ALL, '')

    _getter = itemgetter(key) if isinstance(key, int) else attrgetter(key) if key else str

    # unicode collation doesn't work on development box with OSX for some reason.
    return sorted(iterable, key=lambda obj: locale.strxfrm(_getter(obj)))
Given a class which contains test cases, return a sorted list of
dataset/ETHPy150Open jsmesami/naovoce/src/utils/__init__.py/naturalsort--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/trial/runner.py/TestLoader.loadClass