function [OK, val, warnings] = remoteRetrievalPlain(key, keysToRemove)
% Retrieve value from value store
% val is either the stored value, or any error thrown

% Copyright 2020 The MathWorks, Inc.

wc = parallel.internal.general.WarningsCollector();
pClearIfNecessary(keysToRemove);

try
    val = spmdlang.ValueStore.retrieve(key);
    OK = true;
catch E
    val = E;
    OK = false;
end
warnings = wc.Warnings;
end
