<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_version(self, root):
 """Ensure the root element is a supported version. Args: root (etree.Element) Raises: UnsupportedVersionError """

        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
        )