Add functions for adding or removing labels by query