@classmethod
def preprocess(cls, sort):
    if isinstance(sort, str):
        return [gen.strip() for gen in sort.split('>')]
    elif hasattr(sort, '__getitem__'):
        return list(map(str, sort))
    else:
        raise OptionError("invalid argument for 'sort' option")
@classmethod
def preprocess(cls, sort):
    if isinstance(sort, str):
        return [gen.strip() for gen in sort.split('>')]
    elif hasattr(sort, '__getitem__'):
        return list(map(str, sort))
    else:
        raise OptionError("invalid argument for 'sort' option")