code: def _check_version(self, root):
          
          version = self._get_version(root)
          supported = [StrictVersion(x) for x in
                       self.supported_versions(root.tag)]
  
          if version in supported:
              return
  
          error = "Document version ({0}) not in supported versions ({1})"
          raise UnsupportedVersionError(
              message=error.format(version, supported),
              expected=supported,
              found=version
          )
docs: Ensure the root element is a supported version.
  
          Args:
              root (etree.Element)
  
          Raises:
              UnsupportedVersionError