Slots in RASA 2.x

Hi there! What is the best way to extract a categorical slot through a function in actions.py? What should be it return type. Thank you!