human
Complete this python program:
def assert_min_rpc_version(min_ver, exc=None):
assistant
#Here is the Python program you requested.

    """Decorator to block RPC calls when version cap is lower than min_ver.
    """
    if (exc is None):
        exc = cinder.exception.ServiceTooOld
    def decorator(f):
        @six.wraps(f)
        def _wrapper(self, *args, **kwargs):
            if (not self.client.can_send_version(min_ver)):
                msg = (_('One    of    %(binary)s    services    is    too    old    to    accept    %(method)s    request.    Required    RPC    API    version    is    %(version)s.    Are    you    running    mixed    versions    of    %(binary)ss?') % {'binary': self.BINARY, 'version': min_ver, 'method': f.__name__})
                raise exc(msg)
            return f(self, *args, **kwargs)
        return _wrapper
    return decorator