just ran into this issue!
It seems to be an issue with the loop, cam.GetNextImage needs to be increased to allow for your first hardware trigger. I just added a few 0s.
for i in range(NUM_IMAGES):
try:
# Retrieve the next image from the trigger
result &= grab_next_image_by_trigger(nodemap, cam)
# Retrieve next received image
image_result = cam.GetNextImage(1000)
# Ensure image completion
if image_result.IsIncomplete():
print('Image incomplete with image status %d ...' % image_result.GetImageStatus())
else: