def METHOD_NAME(container: Source1ModelContainer, animset: AnimationSet, scale=SOURCE1_HAMMER_UNIT_TO_METERS):
    for control in animset.controls:
        if control.type == 'DmElement':
            for obj in container.objects:
                if obj.type != 'MESH':
                    continue
                if obj.data.shape_keys and control.name in obj.data.shape_keys.key_blocks:
                    obj.data.shape_keys.key_blocks[control.name].value = control['value']
            pass  # flex
        elif control.type == 'DmeTransformControl':
            bone_name = control.name
            tmp = control['valuePosition']
            pos = Vector(tmp) * scale
            rot = _convert_quat(control['valueOrientation'])
            if container.armature:
                arm = container.armature
                bone = arm.pose.bones.get(bone_name, None)
                if bone:
                    mat = Matrix.Translation(pos) @ rot.to_matrix().to_4x4()
                    mat = bone.parent.matrix @ mat if bone.parent else mat
                    bone.matrix = mat
                    # bone.matrix_basis.identity()