parameters: (vers, opts)
return_statement: return vers
docstring: Synthesize a capability enabled version response
      This is a very limited emulation for relatively recent feature sets
docstring_summary: Synthesize a capability enabled version response
      This is a very limited emulation for relatively recent feature sets
docstring_tokens: Synthesize a capability enabled version response This is a very limited emulation for relatively recent feature sets
function: def synthesize(vers, opts):
      """Synthesize a capability enabled version response
      This is a very limited emulation for relatively recent feature sets
      """
      parsed_version = parse_version(vers["version"])
      vers["capabilities"] = {}
      for name in opts["optional"]:
          vers["capabilities"][name] = check(parsed_version, name)
      failed = False  # noqa: F841 T25377293 Grandfathered in
      for name in opts["required"]:
          have = check(parsed_version, name)
          vers["capabilities"][name] = have
          if not have:
              vers["error"] = (
                  "client required capability `"
                  + name
                  + "` is not supported by this server"
              )
      return vers
function_tokens: def synthesize ( vers , opts ) : parsed_version = parse_version ( vers [ "version" ] ) vers [ "capabilities" ] = { } for name in opts [ "optional" ] : vers [ "capabilities" ] [ name ] = check ( parsed_version , name ) failed = False # noqa: F841 T25377293 Grandfathered in for name in opts [ "required" ] : have = check ( parsed_version , name ) vers [ "capabilities" ] [ name ] = have if not have : vers [ "error" ] = ( "client required capability `" + name + "` is not supported by this server" ) return vers