protected function exportJsonAddExtras($debug_opts, array $machine_graph): array
	{
		if (!empty($this->state_diagram_extras_json)) {
			$graph = $this->state_diagram_extras_json;
			if (!isset($graph['layout'])) {
				$graph['layout'] = 'row';
				$graph['layoutOptions'] = [
					'align' => 'top',
				];
			}
			if (!isset($graph['nodes'])) {
				$graph['nodes'] = [];
			}
			if (!isset($graph['edges'])) {
				$graph['edges'] = [];
			}
			array_unshift($graph['nodes'], [
					'id' => 'smalldb',
					'label' => $this->machine_type,
					'graph' => $machine_graph,
					'color' => '#aaa',
					'x' => 0,
					'y' => 0,
				]);
			return $graph;
		} else {
			return $machine_graph;
		}
	}