def process_subject(subject, file_list, output):
    if (subject == 'S11'):
        assert (len(file_list) == 119), ((('Expected 119 files for subject ' + subject) + ', got ') + str(len(file_list)))
    else:
        assert (len(file_list) == 120), ((('Expected 120 files for subject ' + subject) + ', got ') + str(len(file_list)))
    for f in file_list:
        (action, cam) = os.path.splitext(os.path.basename(f))[0].replace('_', ' ').split('.')
        if ((subject == 'S11') and (action == 'Directions')):
            continue
        if (action not in output[subject]):
            output[subject][action] = [None, None, None, None]
        with h5py.File(f) as hf:
            positions = np.array(hf['poses'])
            positions = positions[:, SH_TO_GT_PERM, :]
            output[subject][action][cam_map[cam]] = positions.astype('float32')
def process_subject(subject, file_list, output):
    if (subject == 'S11'):
        assert (len(file_list) == 119), ((('Expected 119 files for subject ' + subject) + ', got ') + str(len(file_list)))
    else:
        assert (len(file_list) == 120), ((('Expected 120 files for subject ' + subject) + ', got ') + str(len(file_list)))
    for f in file_list:
        (action, cam) = os.path.splitext(os.path.basename(f))[0].replace('_', ' ').split('.')
        if ((subject == 'S11') and (action == 'Directions')):
            continue
        if (action not in output[subject]):
            output[subject][action] = [None, None, None, None]
        with h5py.File(f) as hf:
            positions = np.array(hf['poses'])
            positions = positions[:, SH_TO_GT_PERM, :]
            output[subject][action][cam_map[cam]] = positions.astype('float32')