code: def test_raises_on_invalid_slot_type():
      with pytest.raises(InvalidSlotTypeException):
          Slot.resolve_by_type("foobar")
  
imports: from typing import Any, Tuple, List, Dict, Text
  import pytest
  from _pytest.fixtures import SubRequest
  import rasa.shared.core.constants
  from rasa.shared.core.events import SlotSet
  from rasa.shared.core.slots import InvalidSlotTypeException, Slot, TextSlot, BooleanSlot, FloatSlot, ListSlot, CategoricalSlot, bool_from_any, AnySlot, InvalidSlotConfigError
  from rasa.shared.core.trackers import DialogueStateTracker
label_desc: Use image node_id 3 for calling a global function with example usage: test_raises_on_invalid_slot_type() without return types