code: def custom_slot(internal_slot, resolved_value=None):
      """Creates a custom slot with *resolved_value* being the reference value
      of the slot
  
      Example:
  
          >>> s = unresolved_slot([10, 19], "earl grey", "beverage", "beverage")
          >>> from snips_nlu.common.utils import json_string
          >>> print(json_string(custom_slot(s, "tea"), indent=4, sort_keys=True))
          {
              "entity": "beverage",
              "range": {
                  "end": 19,
                  "start": 10
              },
              "rawValue": "earl grey",
              "slotName": "beverage",
              "value": {
                  "kind": "Custom",
                  "value": "tea"
              }
          }
      """
  
      if resolved_value is None:
          resolved_value = internal_slot[RES_VALUE]
      return {
          RES_MATCH_RANGE: _convert_range(
              internal_slot[RES_MATCH_RANGE]
          ),
          RES_RAW_VALUE: internal_slot[RES_VALUE],
          RES_VALUE: {"kind": "Custom", "value": resolved_value},
          RES_ENTITY: internal_slot[RES_ENTITY],
          RES_SLOT_NAME: internal_slot[RES_SLOT_NAME],
      }
  
file_path: snips-nlu/snips_nlu/result.py
imports: from __future__ import unicode_literals
  from snips_nlu.constants import RES_ENTITY, RES_INPUT, RES_INTENT, RES_INTENT_NAME, RES_MATCH_RANGE, RES_PROBA, RES_RAW_VALUE, RES_SLOTS, RES_SLOT_NAME, RES_VALUE, ENTITY_KIND, RESOLVED_VALUE, VALUE
label_desc: Use image node_id 3 for calling a global function with example usage: custom_slot(internal_slot, resolved_value) and returns: dict