anchor.diff:  
   For more details on specifying scripts see <<modules-scripting, script documentation>>.
   
  +[[scripted-metric-aggregation-return-types]]
   ==== Allowed return types
   
   Whilst any valid script object can be used within a single script, the scripts must return or store in the `state` object only the following types:
  
positive.code: * Map (containing only keys and values of the types listed here)
  * Array (containing elements of only the types listed here)
  
  ==== Scope of scripts
  
  The scripted metric aggregation uses scripts at 4 stages of its execution:
  
negative.code: --------------------------------------------------
  // NOTCONSOLE
  
  [[scripted-metric-aggregation-parameters]]
  ==== Other parameters
  
  [horizontal]
  params::           Optional. An object whose contents will be passed as variables to the  `init_script`, `map_script` and `combine_script`. This can be
  