Is it possible to move an FCurve from one bone to another?
I found that this moves an FCurve from one bone to another:

def moveFcurve(action, fromBone, toBone):
    for fc in [fc for fc in action.fcurves if fc.group.name == fromBone]:
        fc.group.name = toBone
        for channel in fc.group.channels:
            channel.data_path = channel.data_path.replace(fromBone, toBone)