def index_sample_set(obj_data, ws_info, obj_data_v1):
    'Indexer for KBaseSets.SampleSet object type'
    info = obj_data['info']
    if (not obj_data.get('data')):
        raise Exception('no data in object')
    data = obj_data['data']
    workspace_id = info[6]
    object_id = info[0]
    version = info[4]
    sample_set_id = f'{_NAMESPACE}::{workspace_id}:{object_id}'
    ver_sample_set_id = f'{_VER_NAMESPACE}::{workspace_id}:{object_id}:{version}'
    sample_set_index = {'_action': 'index', 'doc': {'description': data['description'], 'sample_ids': [s['id'] for s in data['samples']], 'sample_names': [s['name'] for s in data['samples']], 'sample_versions': [s['version'] for s in data['samples']]}, 'index': _SAMPLE_SET_INDEX_NAME, 'id': sample_set_id}
    (yield sample_set_index)
    ver_sample_set_index = dict(sample_set_index)
    ver_sample_set_index['index'] = _VER_SAMPLE_SET_INDEX_NAME
    ver_sample_set_index['id'] = ver_sample_set_id
    (yield ver_sample_set_index)
    for samp in data['samples']:
        sample = _get_sample(samp)
        sample_id = f"{_SAMPLE_NAMESPACE}::{sample['id']}:{sample['version']}"
        if (len(sample['node_tree']) == 1):
            meta_controlled = _flatten_meta(sample['node_tree'][0]['meta_controlled'])
            meta_user = _flatten_meta(sample['node_tree'][0]['meta_user'])
            meta_controlled['node_id'] = sample['node_tree'][0]['id']
        else:
            (meta_controlled, meta_user) = ({}, {})
            for (idx, node) in enumerate(sample['node_tree']):
                meta_controlled = _combine_meta(meta_controlled, _flatten_meta(node['meta_controlled']), idx)
                meta_user = _combine_meta(meta_user, _flatten_meta(node['meta_user']), idx)
                meta_controlled['node_id'] = node['id']
        sample_index = {'_action': 'index', 'doc': {'save_date': sample['save_date'], 'sample_version': sample['version'], 'name': sample['name'], 'parent_id': sample_set_id, **meta_user, **meta_controlled}, 'index': _SAMPLE_INDEX_NAME, 'id': sample_id}
        (yield sample_index)
Indexer for KBaseSets.SampleSet object type
def index_sample_set(obj_data, ws_info, obj_data_v1):
    
    info = obj_data['info']
    if (not obj_data.get('data')):
        raise Exception('no data in object')
    data = obj_data['data']
    workspace_id = info[6]
    object_id = info[0]
    version = info[4]
    sample_set_id = f'{_NAMESPACE}::{workspace_id}:{object_id}'
    ver_sample_set_id = f'{_VER_NAMESPACE}::{workspace_id}:{object_id}:{version}'
    sample_set_index = {'_action': 'index', 'doc': {'description': data['description'], 'sample_ids': [s['id'] for s in data['samples']], 'sample_names': [s['name'] for s in data['samples']], 'sample_versions': [s['version'] for s in data['samples']]}, 'index': _SAMPLE_SET_INDEX_NAME, 'id': sample_set_id}
    (yield sample_set_index)
    ver_sample_set_index = dict(sample_set_index)
    ver_sample_set_index['index'] = _VER_SAMPLE_SET_INDEX_NAME
    ver_sample_set_index['id'] = ver_sample_set_id
    (yield ver_sample_set_index)
    for samp in data['samples']:
        sample = _get_sample(samp)
        sample_id = f"{_SAMPLE_NAMESPACE}::{sample['id']}:{sample['version']}"
        if (len(sample['node_tree']) == 1):
            meta_controlled = _flatten_meta(sample['node_tree'][0]['meta_controlled'])
            meta_user = _flatten_meta(sample['node_tree'][0]['meta_user'])
            meta_controlled['node_id'] = sample['node_tree'][0]['id']
        else:
            (meta_controlled, meta_user) = ({}, {})
            for (idx, node) in enumerate(sample['node_tree']):
                meta_controlled = _combine_meta(meta_controlled, _flatten_meta(node['meta_controlled']), idx)
                meta_user = _combine_meta(meta_user, _flatten_meta(node['meta_user']), idx)
                meta_controlled['node_id'] = node['id']
        sample_index = {'_action': 'index', 'doc': {'save_date': sample['save_date'], 'sample_version': sample['version'], 'name': sample['name'], 'parent_id': sample_set_id, **meta_user, **meta_controlled}, 'index': _SAMPLE_INDEX_NAME, 'id': sample_id}
        (yield sample_index)