code: def get_slot_name_mapping(dataset, intent):
      """Returns a dict which maps slot names to entities for the provided intent"""
      slot_name_mapping = dict()
      for utterance in dataset[INTENTS][intent][UTTERANCES]:
          for chunk in utterance[DATA]:
              if SLOT_NAME in chunk:
                  slot_name_mapping[chunk[SLOT_NAME]] = chunk[ENTITY]
      return slot_name_mapping
  
file_path: snips-nlu/snips_nlu/common/dataset_utils.py
imports: from snips_nlu.constants import INTENTS, UTTERANCES, DATA, SLOT_NAME, ENTITY
  from snips_nlu.exceptions import DatasetFormatError
label_desc: Use image node_id 6 for calling a global function with example usage: get_slot_name_mapping(dataset, intent) and returns: slot_name_mapping