code: def on_configuration_changed(self, config):
          
          self.width = config['width']
          self.height = config['height']
          self.orientation = ('square', 'portrait', 'landscape')[
                              config['orientation']]
docs: Handles a screen configuration change.