<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def modify_instance_groups(self, instance_group_ids, new_sizes):
 """ Modify the number of nodes and configuration settings in an instance group. :type instance_group_ids: list(str) :param instance_group_ids: A list of the ID's of the instance groups to be modified :type new_sizes: list(int) :param new_sizes: A list of the new sizes for each instance group """

        if type(instance_group_ids) != types.ListType:
            instance_group_ids = [instance_group_ids]
        if type(new_sizes) != types.ListType:
            new_sizes = [new_sizes]

        instance_groups = zip(instance_group_ids, new_sizes)

        params = {}
        for k, ig in enumerate(instance_groups):
            # could be wrong - the example amazon gives uses
            # InstanceRequestCount, while the api documentation
            # says InstanceCount
            params['InstanceGroups.member.%d.InstanceGroupId' % (k+1) ] = ig[0]
            params['InstanceGroups.member.%d.InstanceCount' % (k+1) ] = ig[1]

        return self.get_object('ModifyInstanceGroups', params,
                               ModifyInstanceGroupsResponse, verb='POST')