@classmethod
def preprocess(cls, gen):
    if isinstance(gen, (Basic, int)):
        return gen
    else:
        raise OptionError("invalid argument for 'gen' option")
@classmethod
def preprocess(cls, gen):
    if isinstance(gen, (Basic, int)):
        return gen
    else:
        raise OptionError("invalid argument for 'gen' option")