def load_body_data(smpl_data, gender='female', idx=0, n_sh_bshapes=10):
    """
    Loads MoSHed pose data from CMU Mocap (only the given idx is loaded), and loads all CAESAR shape data.
    Args:
        smpl_data: Files with *trans, *shape, *pose parameters
        gender: female | male. CAESAR data has 2K male, 2K female shapes
        idx: index of the mocap sequence
        n_sh_bshapes: number of shape blendshapes (number of PCA components)
    """
    # create a dictionary with key the sequence name and values the pose and trans
    cmu_keys = []
    for seq in smpl_data.files:
        if seq.startswith('pose_'):
            cmu_keys.append(seq.replace('pose_', ''))

    name = sorted(cmu_keys)[idx % len(cmu_keys)]

    cmu_parms = {}
    for seq in smpl_data.files:
        if seq == ('pose_' + name):
            cmu_parms[seq.replace('pose_', '')] = {
                'poses': smpl_data[seq],
                'trans': smpl_data[seq.replace('pose_', 'trans_')]
            }

    # load all SMPL shapes
    fshapes = smpl_data['%sshapes' % gender][:, :n_sh_bshapes]

    return (cmu_parms, fshapes, name)