Update the throughput of a table and/or global indexes

        Parameters
        ----------
        tablename : str
            Name of the table to update
        throughput : :class:`~dynamo3.fields.Throughput`, optional
            The new throughput of the table
        global_indexes : dict, optional
            DEPRECATED. Use index_updates now.
            Map of index name to :class:`~dynamo3.fields.Throughput`
        index_updates : list of :class:`~dynamo3.fields.IndexUpdate`, optional
            List of IndexUpdates to perform

def update_table(self, tablename, throughput=None, global_indexes=None,
                     index_updates=None):
        """
        Update the throughput of a table and/or global indexes

        Parameters
        ----------
        tablename : str
            Name of the table to update
        throughput : :class:`~dynamo3.fields.Throughput`, optional
            The new throughput of the table
        global_indexes : dict, optional
            DEPRECATED. Use index_updates now.
            Map of index name to :class:`~dynamo3.fields.Throughput`
        index_updates : list of :class:`~dynamo3.fields.IndexUpdate`, optional
            List of IndexUpdates to perform

        """
        kwargs = {
            'TableName': tablename
        }
        all_attrs = set()
        if throughput is not None:
            kwargs['ProvisionedThroughput'] = throughput.schema()
        if index_updates is not None:
            updates = []
            for update in index_updates:
                all_attrs.update(update.get_attrs())
                updates.append(update.serialize())
            kwargs['GlobalSecondaryIndexUpdates'] = updates
        elif global_indexes is not None:
            kwargs['GlobalSecondaryIndexUpdates'] = [
                {
                    'Update': {
                        'IndexName': key,
                        'ProvisionedThroughput': value.schema(),
                    }
                }
                for key, value in six.iteritems(global_indexes)
            ]
        if all_attrs:
            attr_definitions = [attr.definition() for attr in all_attrs]
            kwargs['AttributeDefinitions'] = attr_definitions
        return self.call('update_table', **kwargs)