function createScript(attributes, code) {
  const script = createElement('script', attributes);
  if (code) {
    const scriptText = constructors.text(code);
    append(script, scriptText);
  }
  return script;
}
@param {Record<string, string | undefined>} attributes
@param {string} [code]
@returns {DefaultTreeElement}