code: def _create_custom_entity_parser_configuration(
      entities, stopwords_fraction, language
  ):
      """Dynamically creates the gazetteer parser configuration.
  
      Args:
          entities (dict): entity for the dataset
          stopwords_fraction (float): fraction of the vocabulary of
              the entity values that will be considered as stop words (
              the top n_vocabulary * stopwords_fraction most frequent words will
              be considered stop words)
          language (str): language of the entities
  
      Returns: the parser configuration as dictionary
      """
  
      if not 0 < stopwords_fraction < 1:
          raise ValueError("stopwords_fraction must be in ]0.0, 1.0[")
  
      parser_configurations = []
      for entity_name, entity in sorted(iteritems(entities)):
          vocabulary = set(
              t
              for raw_value in entity[UTTERANCES]
              for t in tokenize_light(raw_value, language)
          )
          num_stopwords = int(stopwords_fraction * len(vocabulary))
          config = {
              "entity_identifier": entity_name,
              "entity_parser": {
                  "threshold": entity[MATCHING_STRICTNESS],
                  "n_gazetteer_stop_words": num_stopwords,
                  "gazetteer": [
                      {"raw_value": k, "resolved_value": v}
                      for k, v in sorted(iteritems(entity[UTTERANCES]))
                  ],
              },
          }
          if LICENSE_INFO in entity:
              config["entity_parser"][LICENSE_INFO] = entity[
                  LICENSE_INFO
              ]
          parser_configurations.append(config)
  
      configuration = {"entity_parsers": parser_configurations}
  
      return configuration
  
imports: from __future__ import unicode_literals
  import json
  import operator
  from copy import deepcopy
  from pathlib import Path
  from future.utils import iteritems, viewvalues
  from snips_nlu.common.utils import json_string
  from snips_nlu.constants import END, ENTITIES, LANGUAGE, MATCHING_STRICTNESS, START, UTTERANCES, LICENSE_INFO
  from snips_nlu.entity_parser.builtin_entity_parser import is_builtin_entity
  from snips_nlu.entity_parser.custom_entity_parser_usage import CustomEntityParserUsage
  from snips_nlu.entity_parser.entity_parser import EntityParser
  from snips_nlu.preprocessing import stem, tokenize, tokenize_light
  from snips_nlu.result import parsed_entity
label_desc: Use image node_id 3 for calling a global function with example usage: _create_custom_entity_parser_configuration(entities, stopwords_fraction, language) and returns: configuration