<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_vmware_version(self):
 """ Check VMware version """


        if sys.platform.startswith("win"):
            # look for vmrun.exe using the directory listed in the registry
            ws_version = self._find_vmware_version_registry(r"SOFTWARE\Wow6432Node\VMware, Inc.\VMware Workstation")
            if ws_version is None:
                player_version = self._find_vmware_version_registry(r"SOFTWARE\Wow6432Node\VMware, Inc.\VMware Player")
                if player_version:
                    log.debug("VMware Player version {} detected".format(player_version))
                    yield from self._check_vmware_player_requirements(player_version)
                else:
                    log.warning("Could not find VMware version")
                    self._host_type = "ws"
            else:
                log.debug("VMware Workstation version {} detected".format(ws_version))
                yield from self._check_vmware_workstation_requirements(ws_version)
        else:
            if sys.platform.startswith("darwin"):
                if not os.path.isdir("/Applications/VMware Fusion.app"):
                    raise VMwareError("VMware Fusion is not installed in the standard location /Applications/VMware Fusion.app")
                self._host_type = "fusion"
                return  # FIXME: no version checking on Mac OS X but we support all versions of fusion

            vmware_path = VMware._get_linux_vmware_binary()
            if vmware_path is None:
                raise VMwareError("VMware is not installed (vmware or vmplayer executable could not be found in $PATH)")

            try:
                output = yield from subprocess_check_output(vmware_path, "-v")
                match = re.search("VMware Workstation ([0-9]+)\.", output)
                version = None
                if match:
                    # VMware Workstation has been detected
                    version = match.group(1)
                    log.debug("VMware Workstation version {} detected".format(version))
                    yield from self._check_vmware_workstation_requirements(version)
                match = re.search("VMware Player ([0-9]+)\.", output)
                if match:
                    # VMware Player has been detected
                    version = match.group(1)
                    log.debug("VMware Player version {} detected".format(version))
                    yield from self._check_vmware_player_requirements(version)
                if version is None:
                    log.warning("Could not find VMware version. Output of VMware: {}".format(output))
                    raise VMwareError("Could not find VMware version. Output of VMware: {}".format(output))
            except (OSError, subprocess.SubprocessError) as e:
                log.error("Error while looking for the VMware version: {}".format(e))
                raise VMwareError("Error while looking for the VMware version: {}".format(e))