<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def SaveState( self, config_parser ):


        if not config_parser.has_section( 'window' ):
            config_parser.add_section( 'window' )
        if self.IsMaximized():
            config_parser.set( 'window', 'maximized', str(True))
        else:
            config_parser.set( 'window', 'maximized', str(False))
        size = self.GetSizeTuple()
        position = self.GetPositionTuple()
        config_parser.set( 'window', 'width', str(size[0]) )
        config_parser.set( 'window', 'height', str(size[1]) )
        config_parser.set( 'window', 'x', str(position[0]) )
        config_parser.set( 'window', 'y', str(position[1]) )
        
        for control in self.ProfileListControls:
            control.SaveState( config_parser )

        return config_parser