Long press and take screenshot at the same time

Hello,
is Appium capable of long press and taking screenshot at the same time? Could not any any info on that.
I know how to take screenshot and longpress separately

Any help appreciated.