<commit_before>import createDOMTree from '../DOM/createTree';
import ExecutionEnvironment from '../util/ExecutionEnvironment';
import createHTMLStringTree from '../htmlString/createHTMLStringTree';
import { createVariable } from './variables';
import scanTreeForDynamicNodes from './scanTreeForDynamicNodes';

function createId() {
	if ( ExecutionEnvironment.canUseSymbol) {
		return Symbol();
	} else {
		let uniqueId = null;

		function getUniqueName(prefix) {
				if (!uniqueId) uniqueId = (Date.now());
				return (prefix || 'id') + (uniqueId++);
			};
		return getUniqueName('Inferno');
	}
}

export default function createTemplate( callback ) {
	let construct = callback.construct;

	if ( !construct ) {
		const callbackLength = callback.length;
		const callbackArguments = new Array( callbackLength );

		for ( let i = 0; i < callbackLength; i++ ) {
			callbackArguments[i] = createVariable( i );
		}
		const schema = callback( ...callbackArguments );
		const dynamicNodeMap = new Map();<commit_msg>Reduce and inline the createId fallback<commit_after>import createDOMTree from '../DOM/createTree';
import ExecutionEnvironment from '../util/ExecutionEnvironment';
import createHTMLStringTree from '../htmlString/createHTMLStringTree';
import { createVariable } from './variables';
import scanTreeForDynamicNodes from './scanTreeForDynamicNodes';

let uniqueId = Date.now();

function createId() {
	if ( ExecutionEnvironment.canUseSymbol ) {
		return Symbol();
	} else {
		return uniqueId++;
	}
}

export default function createTemplate( callback ) {
	let construct = callback.construct;

	if ( !construct ) {
		const callbackLength = callback.length;
		const callbackArguments = new Array( callbackLength );

		for ( let i = 0; i < callbackLength; i++ ) {
			callbackArguments[i] = createVariable( i );
		}
		const schema = callback( ...callbackArguments );
		const dynamicNodeMap = new Map();
{'fraction_non_alphanumeric': 0.12105263157894737, 'fraction_numerical': 0.0010526315789473684, 'mean_word_length': 4.674626865671642, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4410031', 'n_tokens_mistral': 548, 'n_tokens_neox': 510, 'n_words': 150}