'Delete the stored XBlock state for a many xblock usages.
Arguments:
username: The name of the user whose state should be deleted
block_keys (list): The UsageKey identifying which xblock state to delete.
scope (Scope): The scope to delete data from
fields: A list of fields to delete. If None, delete all stored fields.'

def delete_many(self, username, block_keys, scope=Scope.user_state, fields=None):

    if (scope != Scope.user_state):
        raise ValueError('Only    Scope.user_state    is    supported')
    evt_time = time()
    if (fields is None):
        self._ddog_increment(evt_time, 'delete_many.empty_state')
    else:
        self._ddog_histogram(evt_time, 'delete_many.field_count', len(fields))
    self._ddog_histogram(evt_time, 'delete_many.block_count', len(block_keys))
    student_modules = self._get_student_modules(username, block_keys)
    for (student_module, _) in student_modules:
        if (fields is None):
            student_module.state = '{}'
        else:
            current_state = json.loads(student_module.state)
            for field in fields:
                if (field in current_state):
                    del current_state[field]
            student_module.state = json.dumps(current_state)
        student_module.save(force_update=True)
    finish_time = time()
    self._ddog_histogram(evt_time, 'delete_many.response_time', ((finish_time - evt_time) * 1000))
