

def get_subcases(case):
    indices = case.reverse_indices
    subcases = []
    for index in indices:
        if (index.identifier == 'parent'):
            subcases.append(CommCareCase.get(index.referenced_id))
    return subcases

dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/reminders/tasks.py get_subcases/original