function getAvailableVariableName(name, scopes, isSafe = alwaysTrue) {
	if (!isValidIdentifier(name)) {
		name += '_';

		if (!isValidIdentifier(name)) {
			return;
		}
	}

	while (!isSafeName(name, scopes) || !isSafe(name, scopes)) {
		name += '_';
	}

	return name;
}
Generates a unique name prefixed with `name` such that:
- it is not defined in any of the `scopes`,
- it is not a reserved word,
- it is not `arguments` in strict scopes (where `arguments` is not allowed),
- it does not collide with the actual `arguments` (which is always defined in function scopes).

Useful when you want to rename a variable (or create a new variable) while being sure not to shadow any other variables in the code.

@param {string} name - The desired name for a new variable.
@param {Scope[]} scopes - The list of scopes the new variable will be referenced in.
@param {isSafe} [isSafe] - Rule-specific name check function.
@returns {string} - Either `name` as is, or a string like `${name}_` suffixed with underscores to make the name unique.