def init_plan_by_version(input_plan):
    version = input_plan.get('version')
    if version is None:
        raise exception.BadRequest(
            reason='Version attribute is missing in Plan')
    mod = sys.modules[__name__]
    if not hasattr(mod, version % 'init_plan_v%s'):
        raise exception.BadRequest(reason='Plan version %s is invalid.'
                                          % version)
    return getattr(mod, 'init_plan_v%s' % version)(input_plan)
dataset/ETHPy150Open openstack/solum/solum/api/controllers/v1/plan.py/init_plan_by_version/swapped operands of `%`