'Retrieve the stored XBlock state for the specified XBlock usages.
Arguments:
username: The name of the user whose state should be retrieved
block_keys ([UsageKey]): A list of UsageKeys identifying which xblock states to load.
scope (Scope): The scope to load data from
fields: A list of field values to retrieve. If None, retrieve all stored fields.
Yields:
XBlockUserState tuples for each specified UsageKey in block_keys.
field_state is a dict mapping field names to values.'

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

    if (scope != Scope.user_state):
        raise ValueError('Only    Scope.user_state    is    supported,    not    {}'.format(scope))
    total_block_count = 0
    evt_time = time()
    self._nr_stat_increment('get_many', 'calls')
    self._ddog_histogram(evt_time, 'get_many.blks_requested', len(block_keys))
    self._nr_stat_accumulate('get_many', 'blocks_requested', len(block_keys))
    modules = self._get_student_modules(username, block_keys)
    for (module, usage_key) in modules:
        if (module.state is None):
            self._ddog_increment(evt_time, 'get_many.empty_state')
            continue
        state = json.loads(module.state)
        state_length = len(module.state)
        self._ddog_histogram(evt_time, 'get_many.block_size', state_length)
        if (state == {}):
            continue
        self._nr_block_stat_increment('get_many', usage_key.block_type, 'blocks_out')
        self._nr_block_stat_accumulate('get_many', usage_key.block_type, 'size', state_length)
        total_block_count += 1
        if (fields is not None):
            state = {field: state[field] for field in fields if (field in state)}
        (yield XBlockUserState(username, usage_key, state, module.modified, scope))
    finish_time = time()
    duration = ((finish_time - evt_time) * 1000)
    self._ddog_histogram(evt_time, 'get_many.blks_out', total_block_count)
    self._ddog_histogram(evt_time, 'get_many.response_time', duration)
    self._nr_stat_accumulate('get_many', 'duration', duration)
