public function scripted_metric(
        string $name,
        string $initScript = null,
        string $mapScript = null,
        string $combineScript = null,
        string $reduceScript = null
    ): ScriptedMetric {
        return new ScriptedMetric($name, $initScript, $mapScript, $combineScript, $reduceScript);
    }