def CheckInitialized(self):
    """Raises if the library configuration is not valid."""
    super(Library, self).CheckInitialized()
    if self.name not in _NAME_TO_SUPPORTED_LIBRARY:
      raise appinfo_errors.InvalidLibraryName(
          'the library "%s" is not supported' % self.name)

    supported_library = _NAME_TO_SUPPORTED_LIBRARY[self.name]
    if self.version != 'latest':
      if self.version not in supported_library.supported_versions:
        raise appinfo_errors.InvalidLibraryVersion(
            ('%s version "%s" is not supported, ' + _USE_VERSION_FORMAT) % (
                self.name,
                self.version,
                '", "'.join(supported_library.non_deprecated_versions)))
      elif self.version in supported_library.deprecated_versions:
        logging.warning(
            ('%s version "%s" is deprecated, ' + _USE_VERSION_FORMAT) % (
                self.name,
                self.version,
                '", "'.join(supported_library.non_deprecated_versions)))
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/appinfo.py/Library.CheckInitialized/original