code: def get_version_manifest(name, data=None, required=False):
      
      manifest_dir = _get_manifest_dir(data, name)
      manifest_vs = _get_versions_manifest(manifest_dir) or []
      for x in manifest_vs:
          if x["program"] == name:
              v = x.get("version", "")
              if v:
                  return v
      if required:
          raise ValueError("Did not find %s in install manifest. Could not check version." % name)
      return ""
docs: Retrieve a version from the currently installed manifest.