code: def _build_gazetteer_parser(target_dir, gazetteer_entities, language):
      from snips_nlu_parsers import get_builtin_entity_shortname
  
      gazetteer_parser_name = "gazetteer_entity_parser"
      gazetteer_parser_path = target_dir / gazetteer_parser_name
      gazetteer_parser_metadata = []
      for ent in sorted(gazetteer_entities):
          # Fetch the compiled parser in the resources
          source_parser_path = find_gazetteer_entity_data_path(
              language, ent
          )
          short_name = get_builtin_entity_shortname(ent).lower()
          target_parser_path = gazetteer_parser_path / short_name
          parser_metadata = {
              "entity_identifier": ent,
              "entity_parser": short_name,
          }
          gazetteer_parser_metadata.append(parser_metadata)
          # Copy the single entity parser
          shutil.copytree(
              str(source_parser_path), str(target_parser_path)
          )
      # Dump the parser metadata
      gazetteer_entity_parser_metadata = {
          "parsers_metadata": gazetteer_parser_metadata
      }
      gazetteer_parser_metadata_path = (
          gazetteer_parser_path / "metadata.json"
      )
      with gazetteer_parser_metadata_path.open(
          "w", encoding="utf-8"
      ) as f:
          f.write(json_string(gazetteer_entity_parser_metadata))
      return gazetteer_parser_name
  
imports: from __future__ import unicode_literals
  import json
  import shutil
  from future.builtins import str
  from snips_nlu.common.io_utils import temp_dir
  from snips_nlu.common.utils import json_string
  from snips_nlu.constants import DATA_PATH, ENTITIES, LANGUAGE
  from snips_nlu.entity_parser.entity_parser import EntityParser
  from snips_nlu.result import parsed_entity
label_desc: Use image node_id 2 for calling a global function with example usage: _build_gazetteer_parser(target_dir, gazetteer_entities, language) and returns: gazetteer_parser_name