code: def test_atis_long_action_sequence(
      self,
  ):  # pylint: disable=no-self-use
      world = AtisWorld(
          [
              (
                  "what is the earliest flight in morning "
                  "1993 june fourth from boston to pittsburgh"
              )
          ]
      )
      action_sequence = world.get_action_sequence(
          "( SELECT DISTINCT flight.flight_id "
          "FROM flight "
          "WHERE ( flight.departure_time = ( "
          "SELECT MIN ( flight.departure_time ) "
          "FROM flight "
          "WHERE ( flight.departure_time BETWEEN 0 AND 1200 AND "
          "( flight . from_airport IN ( "
          "SELECT airport_service . airport_code "
          "FROM airport_service WHERE airport_service . city_code "
          "IN ( "
          "SELECT city . city_code "
          "FROM city WHERE city.city_name = 'BOSTON' )) "
          "AND flight . to_airport IN ( "
          "SELECT airport_service . airport_code "
          "FROM airport_service "
          "WHERE airport_service . city_code IN ( "
          "SELECT city . city_code "
          "FROM city "
          "WHERE city.city_name = 'PITTSBURGH' )) ) ) ) AND "
          "( flight.departure_time BETWEEN 0 AND 1200 AND "
          "( flight . from_airport IN ( "
          "SELECT airport_service . airport_code "
          "FROM airport_service "
          "WHERE airport_service . city_code IN ( "
          "SELECT city . city_code "
          "FROM city WHERE city.city_name = 'BOSTON' )) "
          "AND flight . to_airport IN ( "
          "SELECT airport_service . airport_code "
          "FROM airport_service WHERE airport_service . city_code IN ( "
          "SELECT city . city_code "
          "FROM city "
          "WHERE city.city_name = 'PITTSBURGH' )) ) ) )   ) ;"
      )
      assert action_sequence == [
          'statement -> [query, ";"]',
          'query -> ["(", "SELECT", distinct, select_results, "FROM", table_refs, '
          'where_clause, ")"]',
          'where_clause -> ["WHERE", "(", conditions, ")"]',
          "conditions -> [condition, conj, conditions]",
          'conditions -> ["(", conditions, ")"]',
          "conditions -> [condition, conj, conditions]",
          'conditions -> ["(", conditions, ")"]',
          "conditions -> [condition, conj, conditions]",
          "conditions -> [condition]",
          "condition -> [in_clause]",
          'in_clause -> [col_ref, "IN", query]',
          'query -> ["(", "SELECT", distinct, select_results, "FROM", table_refs, '
          'where_clause, ")"]',
          'where_clause -> ["WHERE", conditions]',
          "conditions -> [condition]",
          "condition -> [in_clause]",
          'in_clause -> [col_ref, "IN", query]',
          'query -> ["(", "SELECT", distinct, select_results, "FROM", table_refs, '
          'where_clause, ")"]',
          'where_clause -> ["WHERE", conditions]',
          "conditions -> [condition]",
          "condition -> [biexpr]",
          "biexpr -> [col_ref, binaryop, value]",
          "value -> [pos_value]",
          "pos_value -> [string]",
          "string -> [\"'PITTSBURGH'\"]",
          'binaryop -> ["="]',
          'col_ref -> ["city", ".", "city_name"]',
          "table_refs -> [table_name]",
          'table_name -> ["city"]',
          "select_results -> [col_refs]",
          "col_refs -> [col_ref]",
          'col_ref -> ["city", ".", "city_code"]',
          'distinct -> [""]',
          'col_ref -> ["airport_service", ".", "city_code"]',
          "table_refs -> [table_name]",
          'table_name -> ["airport_service"]',
          "select_results -> [col_refs]",
          "col_refs -> [col_ref]",
          'col_ref -> ["airport_service", ".", "airport_code"]',
          'distinct -> [""]',
          'col_ref -> ["flight", ".", "to_airport"]',
          'conj -> ["AND"]',
          "condition -> [in_clause]",
          'in_clause -> [col_ref, "IN", query]',
          'query -> ["(", "SELECT", distinct, select_results, "FROM", table_refs, '
          'where_clause, ")"]',
          'where_clause -> ["WHERE", conditions]',
          "conditions -> [condition]",
          "condition -> [in_clause]",
          'in_clause -> [col_ref, "IN", query]',
          'query -> ["(", "SELECT", distinct, select_results, "FROM", table_refs, '
          'where_clause, ")"]',
          'where_clause -> ["WHERE", conditions]',
          "conditions -> [condition]",
          "condition -> [biexpr]",
          "biexpr -> [col_ref, binaryop, value]",
          "value -> [pos_value]",
          "pos_value -> [string]",
          "string -> [\"'BOSTON'\"]",
          'binaryop -> ["="]',
          'col_ref -> ["city", ".", "city_name"]',
          "table_refs -> [table_name]",
          'table_name -> ["city"]',
          "select_results -> [col_refs]",
          "col_refs -> [col_ref]",
          'col_ref -> ["city", ".", "city_code"]',
          'distinct -> [""]',
          'col_ref -> ["airport_service", ".", "city_code"]',
          "table_refs -> [table_name]",
          'table_name -> ["airport_service"]',
          "select_results -> [col_refs]",
          "col_refs -> [col_ref]",
          'col_ref -> ["airport_service", ".", "airport_code"]',
          'distinct -> [""]',
          'col_ref -> ["flight", ".", "from_airport"]',
          'conj -> ["AND"]',
          "condition -> [ternaryexpr]",
          'ternaryexpr -> [col_ref, "BETWEEN", value, "AND", value]',
          "value -> [pos_value]",
          "pos_value -> [number]",
          'number -> ["1200"]',
          "value -> [pos_value]",
          "pos_value -> [number]",
          'number -> ["0"]',
          'col_ref -> ["flight", ".", "departure_time"]',
          'conj -> ["AND"]',
          "condition -> [biexpr]",
          "biexpr -> [col_ref, binaryop, value]",
          "value -> [pos_value]",
          "pos_value -> [agg_results]",
          'agg_results -> ["(", "SELECT", distinct, agg, "FROM", table_name, '
          'where_clause, ")"]',
          'where_clause -> ["WHERE", "(", conditions, ")"]',
          "conditions -> [condition, conj, conditions]",
          'conditions -> ["(", conditions, ")"]',
          "conditions -> [condition, conj, conditions]",
          "conditions -> [condition]",
          "condition -> [in_clause]",
          'in_clause -> [col_ref, "IN", query]',
          'query -> ["(", "SELECT", distinct, select_results, "FROM", table_refs, '
          'where_clause, ")"]',
          'where_clause -> ["WHERE", conditions]',
          "conditions -> [condition]",
          "condition -> [in_clause]",
          'in_clause -> [col_ref, "IN", query]',
          'query -> ["(", "SELECT", distinct, select_results, "FROM", table_refs, '
          'where_clause, ")"]',
          'where_clause -> ["WHERE", conditions]',
          "conditions -> [condition]",
          "condition -> [biexpr]",
          "biexpr -> [col_ref, binaryop, value]",
          "value -> [pos_value]",
          "pos_value -> [string]",
          "string -> [\"'PITTSBURGH'\"]",
          'binaryop -> ["="]',
          'col_ref -> ["city", ".", "city_name"]',
          "table_refs -> [table_name]",
          'table_name -> ["city"]',
          "select_results -> [col_refs]",
          "col_refs -> [col_ref]",
          'col_ref -> ["city", ".", "city_code"]',
          'distinct -> [""]',
          'col_ref -> ["airport_service", ".", "city_code"]',
          "table_refs -> [table_name]",
          'table_name -> ["airport_service"]',
          "select_results -> [col_refs]",
          "col_refs -> [col_ref]",
          'col_ref -> ["airport_service", ".", "airport_code"]',
          'distinct -> [""]',
          'col_ref -> ["flight", ".", "to_airport"]',
          'conj -> ["AND"]',
          "condition -> [in_clause]",
          'in_clause -> [col_ref, "IN", query]',
          'query -> ["(", "SELECT", distinct, select_results, "FROM", table_refs, '
          'where_clause, ")"]',
          'where_clause -> ["WHERE", conditions]',
          "conditions -> [condition]",
          "condition -> [in_clause]",
          'in_clause -> [col_ref, "IN", query]',
          'query -> ["(", "SELECT", distinct, select_results, "FROM", table_refs, '
          'where_clause, ")"]',
          'where_clause -> ["WHERE", conditions]',
          "conditions -> [condition]",
          "condition -> [biexpr]",
          "biexpr -> [col_ref, binaryop, value]",
          "value -> [pos_value]",
          "pos_value -> [string]",
          "string -> [\"'BOSTON'\"]",
          'binaryop -> ["="]',
          'col_ref -> ["city", ".", "city_name"]',
          "table_refs -> [table_name]",
          'table_name -> ["city"]',
          "select_results -> [col_refs]",
          "col_refs -> [col_ref]",
          'col_ref -> ["city", ".", "city_code"]',
          'distinct -> [""]',
          'col_ref -> ["airport_service", ".", "city_code"]',
          "table_refs -> [table_name]",
          'table_name -> ["airport_service"]',
          "select_results -> [col_refs]",
          "col_refs -> [col_ref]",
          'col_ref -> ["airport_service", ".", "airport_code"]',
          'distinct -> [""]',
          'col_ref -> ["flight", ".", "from_airport"]',
          'conj -> ["AND"]',
          "condition -> [ternaryexpr]",
          'ternaryexpr -> [col_ref, "BETWEEN", value, "AND", value]',
          "value -> [pos_value]",
          "pos_value -> [number]",
          'number -> ["1200"]',
          "value -> [pos_value]",
          "pos_value -> [number]",
          'number -> ["0"]',
          'col_ref -> ["flight", ".", "departure_time"]',
          'table_name -> ["flight"]',
          'agg -> [agg_func, "(", col_ref, ")"]',
          'col_ref -> ["flight", ".", "departure_time"]',
          'agg_func -> ["MIN"]',
          'distinct -> [""]',
          'binaryop -> ["="]',
          'col_ref -> ["flight", ".", "departure_time"]',
          "table_refs -> [table_name]",
          'table_name -> ["flight"]',
          "select_results -> [col_refs]",
          "col_refs -> [col_ref]",
          'col_ref -> ["flight", ".", "flight_id"]',
          'distinct -> ["DISTINCT"]',
      ]
  
file_path: magnitude/pymagnitude/third_party/allennlp/tests/semparse/worlds/atis_world_test.py
imports: from __future__ import division
  from __future__ import absolute_import
  import json
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.semparse.worlds.atis_world import AtisWorld
  from io import open
label_desc: Use image node_id 5 for calling the TestAtisWorld obj's underlying member method code with example usage: obj.test_atis_long_action_sequence() without return types