question: If an image shows just one herd dog behind and to the left of a group of sheep.
#1 return herd dogs 
#2 return a  group of sheep 
#3 return #1 behind #2 
#4 return #1 to  the  left of #2 
#5 return #1 in  both  #3 and #4 
#6 return images of #5 
#7 return number of  #5 for each  #6 
#8 return #6 where  #7 is equal to  one 
#9 return number of  #8 
#10 return if  #9 is equal to  one