Create assertion api function