function createLanguage(linguistLanguage, getOverrides) {
  const language = { ...linguistLanguage, ...getOverrides(linguistLanguage) };
  language.linguistLanguageId = language.languageId;

  for (const field of excludedFields) {
    delete language[field];
  }

  for (const property of arrayTypeFields) {
    const value = language[property];

    assert.ok(
      value === undefined ||
        (Array.isArray(value) && new Set(value).size === value.length),
      `Language property '${property}' should be 'undefined' or unique array.`,
    );
  }

  return language;
}
@param {LinguistLanguage} linguistLanguage
@param {(data: LinguistLanguage) => Partial<LinguistLanguage & Language>} getOverrides
@returns {Language}