If the left image contains one standing doberman with a chain around its neck, and the right image includes at least one doberman reclining on green grass.
return left image  ;return doberman  in  #1 ;return #2 that is standing ;return chain in  #1 ;return neck of #2 ;return #4 that is around #5 ;return #2 that has #6 ;return number of  #7 ;return if  #8 is equal to  one ;return right image  ;return doberman  in  #10 ;return grass in  #10 ;return #12 that is green ;return #11 that is reclining on #13 ;return number of  #14 ;return if  #15 is at least one ;return if  both  #9 and #16 are true
['select', 'project', 'filter', 'project', 'project', 'filter', 'filter', 'aggregate', 'boolean', 'select', 'project', 'project', 'filter', 'filter', 'aggregate', 'boolean', 'boolean']