In my case I tried updating package, ciffi and python version as well. But it did not work for my azure fucnitons. I have updated pipeline agent node OS from Ubuntu 20 to 22. It started working fine for me.