<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def choice_type(self, tchain, p_elem):
 """Handle ``enumeration`` and ``union`` types."""

        elem = SchemaNode.choice(p_elem, occur=2)
        self.handle_substmts(tchain[0], elem)