How to use code to access libcamera(C++/Python)

Hi,

Do you have examples of how to use Picamera2 with the new camera ? and its autofocus settings ?

I see you have a script here :- Raspberry Pi Camera Autofocus: Complete Guide (V1, V2 & HQ)
but this no longer works with Picamera2

Thanks
Mark