If there is a single dog in one image and multiple dogs in the other image.
return one image  ;return dogs of #1 ;return the  number of  #2 ;return if  #3 is equal to  one ;return other image  ;return dogs of #5 ;return the  number of  #6 ;return if  #7 is higher than one ;return if  both  #4 and #8 is true
['select', 'project', 'aggregate', 'boolean', 'select', 'project', 'aggregate', 'boolean', 'boolean']