def version(criteria_string):
return Version(criteria_string, get_version)<EOL>
Version requirement decorator

    This decorator can be used to decorate either a subclass of Resource or
    a memthod of Resource subclass. It supports version validation and
    versioned methods

    1. Decorate a class
    The decorated class can not be instantiated and the static methods and
    class methods of it will not be able to be invoked when the version
    criteria is not satisfied. The version information is retrieved from the
    cli parameter which could be a UnityClient or CliClient.

    For example:

    >>>  @version('>3.0')
    >>>  class OneResource(Resource):
    >>>      def __init__(self, cli)
    >>>          super(OneResource, self).__init__()
    >>>          self._cli = cli

    2. Decorate a method
    The decorated method will not be able to be invoked if the version
    criteria is not satisfied. For instance method, the version information
    is retrieved from the instance itself. For staticmethod, constructor or
    classmethod, the version information is retrieved from the cli parameter
    which could be a UnityClient or CliClient.
    The versioned method is supported with using this decorator. Multiple
    methods can be defined with a same name after decorating it with different
    versions criterias. When the method is invoked, the method that satisfying
    the version will be used. Note that the '# noqa' is needed to get rid of
    pep8 error.

    For example:

    >>>  class TwoResource(Resource):
    >>>      def __init__(self, cli)
    >>>          super(OneResource, self).__init__()
    >>>          self._cli = cli
    >>>
    >>>      @staticmethod
    >>>      @version('<2.0')
    >>>      def static_method(a)
    >>>          pass
    >>>
    >>>      @version('>2.0')
    >>>      def method(a, b)
    >>>          return '>2.0'
    >>>
    >>>      @version('<=2.0')  # noqa
    >>>      def method(a, b)
    >>>          return '<=2.0'

    :param criteria_string: The version criteria expression. The supported
         comparator includes: <, <=, =, ==, !=, >, >=, <>(between)