'Arguments:
user_partitions (list[UserPartition])
xblock (XBlock)
merged_parent_access_list (list[_MergedGroupAccess])'

def __init__(self, user_partitions, xblock, merged_parent_access_list):

    self._access = {}
    xblock_group_access = get_field_on_block(xblock, 'group_access', default_value={})
    for partition in user_partitions:
        merged_parent_group_ids = None
        if merged_parent_access_list:
            merged_parent_group_ids = set()
            for merged_parent_access in merged_parent_access_list:
                if (partition.id in merged_parent_access._access):
                    merged_parent_group_ids.update(merged_parent_access._access[partition.id])
                else:
                    merged_parent_group_ids = None
                    break
        xblock_partition_access = (set((xblock_group_access.get(partition.id) or [])) or None)
        merged_group_ids = _MergedGroupAccess._intersection(xblock_partition_access, merged_parent_group_ids)
        if (merged_group_ids is not None):
            self._access[partition.id] = merged_group_ids
