setCustomElementsScopingRules = rules => {
    if (!rules || !rules.include) {
      throw new Error(`"rules" must be an object with at least an "include" property`);
    }
    if (!Array.isArray(rules.include) || rules.include.some(rule => !(rule instanceof RegExp))) {
      throw new Error(`"rules.include" must be an array of regular expressions`);
    }
    if (rules.exclude && (!Array.isArray(rules.exclude) || rules.exclude.some(rule => !(rule instanceof RegExp)))) {
      throw new Error(`"rules.exclude" must be an array of regular expressions`);
    }
    rules.exclude = rules.exclude || [];
    rulesObj = rules;
    tagsCache.clear(); // reset the cache upon setting new rules
  }
Sets the rules, governing which custom element tags to scope and which not, f.e.
setCustomElementsScopingRules({include: [/^ui5-/]}, exclude: [/^ui5-mylib-/, /^ui5-carousel$/]);
will scope all elements starting with "ui5-" but not the ones starting with "ui5-mylib-" and not "ui5-carousel".

@public
@param rules Object with "include" and "exclude" properties, both arrays of regular expressions. Note that "include"
rules are applied first and "exclude" rules second.