If each image shows a train headed leftward, and one train is green while the other features red on its front.
return train  ;return #1 that is headed leftward ;return images ;return number of  #2 for each  #3 ;return #3 where  #4 is at least one ;return number of  #3 ;return number of  #5 ;return if  #6 is equal to  #7 ;return #1 that is green ;return number of  #9 ;return if  #10 is equal to  one ;return front of #1 ;return #12 that is red ;return #1 that has #13 ;return number of  #14 ;return if  #15 is equal to  one ;return if  both  #11 and #16 are true ;return if  both  #8 and #17 are true
['select', 'filter', 'select', 'group', 'comparative', 'aggregate', 'aggregate', 'boolean', 'filter', 'aggregate', 'boolean', 'project', 'filter', 'filter', 'aggregate', 'boolean', 'boolean', 'boolean']