code: def _get_dataset_metadata(dataset):
      dataset = dataset
      entities = dict()
      for entity_name, entity in iteritems(dataset[ENTITIES]):
          if is_builtin_entity(entity_name):
              continue
          entities[entity_name] = {
              AUTOMATICALLY_EXTENSIBLE: entity[AUTOMATICALLY_EXTENSIBLE]
          }
      slot_name_mappings = get_slot_name_mappings(dataset)
      return {
          "language_code": dataset[LANGUAGE],
          "entities": entities,
          "slot_name_mappings": slot_name_mappings,
      }
  
imports: from __future__ import unicode_literals
  import json
  import logging
  from builtins import str
  from collections import defaultdict
  from pathlib import Path
  from future.utils import iteritems, itervalues
  from snips_nlu.__about__ import __model_version__, __version__
  from snips_nlu.common.dataset_utils import get_slot_name_mappings
  from snips_nlu.common.log_utils import log_elapsed_time
  from snips_nlu.common.utils import check_persisted_path, fitted_required, json_string
  from snips_nlu.constants import AUTOMATICALLY_EXTENSIBLE, BUILTIN_ENTITY_PARSER, CUSTOM_ENTITY_PARSER, ENTITIES, ENTITY_KIND, LANGUAGE, RESOLVED_VALUE, RES_ENTITY, RES_INTENT, RES_INTENT_NAME, RES_MATCH_RANGE, RES_PROBA, RES_SLOTS, RES_VALUE, RESOURCES, BYPASS_VERSION_CHECK
  from snips_nlu.dataset import validate_and_format_dataset
  from snips_nlu.default_configs import DEFAULT_CONFIGS
  from snips_nlu.entity_parser import CustomEntityParser
  from snips_nlu.entity_parser.builtin_entity_parser import BuiltinEntityParser, is_builtin_entity
  from snips_nlu.exceptions import InvalidInputError, IntentNotFoundError, LoadingError, IncompatibleModelError
  from snips_nlu.intent_parser import IntentParser
  from snips_nlu.pipeline.configs import NLUEngineConfig
  from snips_nlu.pipeline.processing_unit import ProcessingUnit
  from snips_nlu.resources import load_resources_from_dir, persist_resources
  from snips_nlu.result import builtin_slot, custom_slot, empty_result, extraction_result, is_empty, parsing_result
label_desc: Use image node_id 1 for calling a global function with example usage: _get_dataset_metadata(dataset) and returns: dict