class_docstr: An example for training/inference.
class_docstr_tok: ["An","example","for","training\/inference","."]
docstr: Add features for categorical slots.
  Args:
      state_update: slot value pairs of the state update
docstr_tok: ["Add","features","for","categorical","slots",".","Args",":","state_update",":","slot","value","pairs","of","the","state","update"]
code: def add_categorical_slots(self, state_update: dict):
      """Add features for categorical slots.
      Args:
          state_update: slot value pairs of the state update
      """
  
      categorical_slots = self.service_schema.categorical_slots
      if not categorical_slots:
          return
      slot = categorical_slots[self.categorical_slot_id]
      values = state_update.get(slot, [])
  
      if not values:
          self.categorical_slot_status = STATUS_OFF
      elif values[0] == STR_DONTCARE:
          self.categorical_slot_status = STATUS_DONTCARE
      else:
          self.categorical_slot_status = STATUS_ACTIVE
          self.categorical_slot_value_status = (
              self.categorical_slot_value_id
              == self.service_schema.get_categorical_slot_value_id(
                  slot, values[0]
              )
          )
  
file_path: NeMo/nemo/collections/nlp/data/dialogue/input_example/sgd_input_example.py
imports: from typing import List
  from nemo.collections.nlp.data.dialogue.input_example.input_example import DialogueInputExample
  from nemo.utils import logging
label_desc: Use image node_id 7 for calling the SGDInputExample obj's underlying member method code with example usage: obj.add_categorical_slots(state_update) without return types