<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add(self, plm, device, stateType, stateName, group, defaultValue=None):
 """Add a state to the StateList."""

        self._stateList[group] = stateType(plm, device, stateName, group,
                                           defaultValue=defaultValue)