'Update usage information for particular Partition Configuration.
Returns json of particular partition configuration updated with usage information.'

@staticmethod
def update_partition_usage_info(store, course, configuration):

    usage_info = GroupConfiguration.get_partitions_usage_info(store, course)
    partition_configuration = configuration.to_json()
    for group in partition_configuration['groups']:
        group['usage'] = usage_info.get(group['id'], [])
    return partition_configuration
