code: def _persist_gazetteer(gazetteer, path):
      # Sort gazetteer to avoid serialization diffs
      gazetteer = sorted(gazetteer)
      with path.open(encoding="utf8", mode="w") as f:
          for word in gazetteer:
              f.write("%s\n" % word)
  
imports: from __future__ import unicode_literals
  import json
  from collections import defaultdict
  from copy import deepcopy
  from pathlib import Path
  from future.utils import iteritems
  from snips_nlu.common.utils import get_package_path, is_package, json_string
  from snips_nlu.constants import CUSTOM_ENTITY_PARSER_USAGE, DATA_PATH, GAZETTEERS, NOISE, STEMS, STOP_WORDS, WORD_CLUSTERS, METADATA
  from snips_nlu.entity_parser.custom_entity_parser import CustomEntityParserUsage
label_desc: Use image node_id 26 for calling a global function with example usage: _persist_gazetteer(gazetteer, path) without return types