code: def _construct_output_to_match(output_block):
      
      output_block.validate()
  
      selections = (
          u'%s AS `%s`' % (output_block.fields[key].to_match(), key)
          for key in sorted(output_block.fields.keys())  # Sort keys for deterministic output order.
      )
  
      return u'SELECT %s FROM' % (u', '.join(selections),)
docs: Transform a ConstructResult block into a MATCH query string.