How to lock and unlock iPhone(real device) using appium?

Currently it is only possible to lock/unlock the iOS device’s screen if it is a simple “swipe” lock screen. Passcode or biometric lock types cannot be handled automatically.