<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def FromString(cls, desc):
 """Create a slot identifier from a string description. The string needs to be either: controller OR slot <X> where X is an integer that can be converted with int(X, 0) Args: desc (str):
 The string description of the slot Returns: SlotIdentifier """


        desc = str(desc)

        if desc == u'controller':
            return SlotIdentifier(controller=True)

        words = desc.split()
        if len(words) != 2 or words[0] != u'slot':
            raise ArgumentError(u"Illegal slot identifier", descriptor=desc)

        try:
            slot_id = int(words[1], 0)
        except ValueError:
            raise ArgumentError(u"Could not convert slot identifier to number", descriptor=desc, number=words[1])

        return SlotIdentifier(slot=slot_id)