'Collects any information that\'s necessary to execute this
transformer\'s transform method.'

@classmethod
def collect(cls, block_structure):

    root_block = block_structure.get_xblock(block_structure.root_block_usage_key)
    user_partitions = getattr(root_block, 'user_partitions', [])
    for block_key in block_structure.topological_traversal(filter_func=(lambda block_key: (block_key.block_type == 'split_test')), yield_descendants_of_unyielded=True):
        xblock = block_structure.get_xblock(block_key)
        partition_for_this_block = next((partition for partition in user_partitions if (partition.id == xblock.user_partition_id)), None)
        if (not partition_for_this_block):
            continue
        child_to_group = {xblock.group_id_to_child.get(unicode(group.id), None): group.id for group in partition_for_this_block.groups}
        for child_location in xblock.children:
            child = block_structure.get_xblock(child_location)
            group = child_to_group.get(child_location, None)
            child.group_access[partition_for_this_block.id] = ([group] if (group is not None) else [])
