function serializeEvalscript(evalscript) {
  const version = evalscript.version || defaultEvalscriptVersion;
  return `//VERSION=${version}
    ${serializeFunction('setup', evalscript.setup)}
    ${serializeFunction('evaluatePixel', evalscript.evaluatePixel)}
    ${serializeFunction('updateOutput', evalscript.updateOutput)}
  `;
}
@param {Evalscript} evalscript The object to serialize.
@return {string} The serialized Evalscript.