def requires_swimlane_version(min_version=None, max_version=None):
if min_version is None and max_version is None:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if min_version and max_version and compare_versions(min_version, max_version) < <NUM_LIT:0>:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(min_version, max_version))<EOL><DEDENT>def decorator(func):<EOL><INDENT>@functools.wraps(func)<EOL>def wrapper(self, *args, **kwargs):<EOL><INDENT>swimlane = self._swimlane<EOL>if min_version and compare_versions(min_version, swimlane.build_version, True) < <NUM_LIT:0>:<EOL><INDENT>raise InvalidSwimlaneBuildVersion(swimlane, min_version, max_version)<EOL><DEDENT>if max_version and compare_versions(swimlane.build_version, max_version, True) < <NUM_LIT:0>:<EOL><INDENT>raise InvalidSwimlaneBuildVersion(swimlane, min_version, max_version)<EOL><DEDENT>return func(self, *args, **kwargs)<EOL><DEDENT>return wrapper<EOL><DEDENT>return decorator<EOL>
Decorator for SwimlaneResolver methods verifying Swimlane server build version is within a given inclusive range

    Raises:
        InvalidVersion: Raised before decorated method call if Swimlane server version is out of provided range
        ValueError: If neither min_version or max_version were provided, or if those values conflict (2.15 < 2.14)