def _get_rbe3_um(i, unused_j, idata, unused_fdata):
    """helper for ``read_rbe3s_from_idata_fdata``"""
    gmi = []
    cmi = []
    if idata[i] == -2:
        i += 1
    if idata[i] != -3:
        while idata[i] != -3:
            gm = idata[i]
            cm = idata[i + 1]
            gmi.append(gm)
            cmi.append(cm)
            i += 2
    if idata[i] == -3:
        i += 1
    return i, gmi, cmi
