def _check_image_id(image_id):
 if (image_id and (len(image_id) > models.Image.id.property.columns[0].type.length)):
  raise exception.ImageNotFound()

def _check_image_id ( image_id ) : if ( image_id and ( len ( image_id ) > models . Image . id . property . columns [ 0 ] . type . length ) ) : raise exception . ImageNotFound ( )
check if the given image id is valid before executing operations .