<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_version_manifest(name, data=None, required=False):
 """Retrieve a version from the currently installed manifest. """

    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 ""