code: def test_get_logical_form_adds_var_correctly(self):
      world = self.wikitables_world
      action_sequence = [
          "@start@ -> e",
          "e -> [<r,e>, r]",
          "<r,e> -> [<<#1,#2>,<#2,#1>>, <e,r>]",
          "<<#1,#2>,<#2,#1>> -> reverse",
          "<e,r> -> fb:row.row.league",
          "r -> [<d,<d,<#1,<<d,#1>,#1>>>>, d, d, r, <d,r>]",
          "<d,<d,<#1,<<d,#1>,#1>>>> -> argmin",
          "d -> [<e,d>, e]",
          "<e,d> -> number",
          "e -> 1",
          "d -> [<e,d>, e]",
          "<e,d> -> number",
          "e -> 1",
          "r -> [<#1,#1>, r]",
          "<#1,#1> -> fb:type.object.type",
          "r -> fb:type.row",
          "<d,r> -> [<<#1,#2>,<#2,#1>>, <r,d>]",
          "<<#1,#2>,<#2,#1>> -> reverse",
          "<r,d> -> ['lambda x', d]",
          "d -> [<r,d>, r]",
          "<r,d> -> [<<#1,#2>,<#2,#1>>, <d,r>]",
          "<<#1,#2>,<#2,#1>> -> reverse",
          "<d,r> -> fb:row.row.index",
          "r -> x",
      ]
      logical_form = world.get_logical_form(action_sequence)
      assert "(var x)" in logical_form
      expected_logical_form = (
          "((reverse fb:row.row.league) (argmin (number 1) (number 1) "
          "(fb:type.object.type fb:type.row) "
          "(reverse (lambda x ((reverse fb:row.row.index) (var x))))))"
      )
      parsed_logical_form = world.parse_logical_form(logical_form)
      parsed_expected_logical_form = world.parse_logical_form(
          expected_logical_form
      )
      assert parsed_logical_form == parsed_expected_logical_form
  
imports: from __future__ import with_statement
  from __future__ import division
  from __future__ import absolute_import
  import json
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data.tokenizers import Token
  from allennlp.semparse import ParsingError, World
  from allennlp.semparse.contexts import TableQuestionKnowledgeGraph
  from allennlp.semparse.worlds import NlvrWorld, WikiTablesWorld
  from io import open
label_desc: Use image node_id 13 for calling the TestWorld obj's underlying member method code with example usage: obj.test_get_logical_form_adds_var_correctly() without return types