def check_keypoint(kp, rows, cols):
for name, value, size in zip(['<STR_LIT:x>', '<STR_LIT:y>'], kp[:<NUM_LIT:2>], [cols, rows]):<EOL><INDENT>if not <NUM_LIT:0> <= value < size:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(<EOL>kp=kp,<EOL>name=name,<EOL>value=value,<EOL>size=size<EOL>)<EOL>)<EOL><DEDENT><DEDENT>
Check if keypoint coordinates are in range [0, 1)