(app, module)
return [
        {
            'session_var': session_var,
            'case_type': mod.case_type,
            'module': mod,
            'index': i
        }
        for i, (mod, session_var) in reversed(list(enumerate(select_chain)))
    ]
return list of dicts containing datum IDs and case types
        [
           {'session_var': 'parent_parent_id', ... },
           {'session_var': 'parent_id', ...}
           {'session_var': 'child_id', ...},
        ]
return list of dicts containing datum IDs and case types
        [
           {'session_var': 'parent_parent_id', ... },
           {'session_var': 'parent_id', ...}
           {'session_var': 'child_id', ...},
        ]
return list of dicts containing datum IDs and case types [ { session_var : parent_parent_id ... } { session_var : parent_id ... } { session_var : child_id ... } ]
def get_select_chain_meta(app, module):
    """
        return list of dicts containing datum IDs and case types
        [
           {'session_var': 'parent_parent_id', ... },
           {'session_var': 'parent_id', ...}
           {'session_var': 'child_id', ...},
        ]
    """
    if not (module and module.module_type == 'basic'):
        return []

    select_chain = get_select_chain_with_sessions(app, module)
    return [
        {
            'session_var': session_var,
            'case_type': mod.case_type,
            'module': mod,
            'index': i
        }
        for i, (mod, session_var) in reversed(list(enumerate(select_chain)))
    ]
def get_select_chain_meta ( app , module ) : if not ( module and module . module_type == 'basic' ) : return [ ] select_chain = get_select_chain_with_sessions ( app , module ) return [ { 'session_var' : session_var , 'case_type' : mod . case_type , 'module' : mod , 'index' : i } for i , ( mod , session_var ) in reversed ( list ( enumerate ( select_chain ) ) ) ]