<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_modes(self, zone):
 """Returns the set of modes the device can be assigned."""

        self._populate_full_data()
        device = self._get_device(zone)
        return device['thermostat']['allowedModes']