def __init__(self, message_dict, min_supported_version=INITIAL_VERSION,
               max_supported_version=MAX_VERSION, default_version=INITIAL_VERSION):
    assert type(message_dict) is dict, (type(message_dict), message_dict)
    self.dict = message_dict

    assert min_supported_version >= MIN_SUPPORTED_MESSAGE_VERSION
    assert max_supported_version <= MAX_MESSAGE_VERSION

    self.original_version = self._GetMessageVersion(max_supported_version, default_version)
    self.version = self.original_version

    # Verify that the message's version should be accepted.
    if self.version > max_supported_version:
      raise BadMessageException('Version %d of this message is not supported by the server.' % self.version +
                                ' The server only supports this message up to version %d.' %
                                max_supported_version)

    if self.version < min_supported_version:
      raise BadMessageException('Version %d of this message is not supported by the server.' % self.version +
                                ' The server only supports this message starting at version %d.' %
                                min_supported_version)
Test get_tag_uri() correctly generates TagURIs.
dataset/ETHPy150Open viewfinderco/viewfinder/backend/base/message.py/Message.__init__--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/tests/regressiontests/utils/feedgenerator.py/FeedgeneratorTest.test_get_tag_uri