Key Code Long Press for n Seconds

Hello,

I want to Long Press particular Key Code KC for n seconds. Pls advice:

I tried something like below, but it didn’t work:
self.driver2.TouchAction.long_press_keycode(KC).wait(n*1000).release().perform()

Thanks
Vishnu