<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_configuration_changed(self, config):
 """ Handles a screen configuration change. """

        self.width = config['width']
        self.height = config['height']
        self.orientation = ('square', 'portrait', 'landscape')[
                            config['orientation']]