public function filterStructuredVariables(array $structure, array $filter)
    {
        $all = [
            \taoResultServer_models_classes_ResponseVariable::class,
            \taoResultServer_models_classes_OutcomeVariable::class,
            \taoResultServer_models_classes_TraceVariable::class
        ];
        $toRemove = array_diff($all, $filter);
        $filtered = $structure;
        foreach ($filtered as $timestamp => $entry) {
            foreach ($entry as $key => $value) {
                if (in_array($key, $toRemove)) {
                    unset($filtered[$timestamp][$key]);
                }
            }
        }
        return $filtered;
    }