code: def test_get_logical_forms_with_agenda(self):
      black_logical_forms = self.walker.get_logical_forms_with_agenda(
          ["<o,o> -> black"]
      )
      # These are all the possible logical forms with black
      assert len(black_logical_forms) == 25
      shortest_logical_form = self.walker.get_logical_forms_with_agenda(
          ["<o,o> -> black"], 1
      )[0]
      # This is the shortest complete logical form with black
      assert (
          shortest_logical_form == "(object_exists (black all_objects))"
      )
      black_triangle_touch_forms = (
          self.walker.get_logical_forms_with_agenda(
              [
                  "<o,o> -> black",
                  "<o,o> -> triangle",
                  "<o,o> -> touch_wall",
              ]
          )
      )
      # Permutations of the three functions. There will not be repetitions of any functions
      # because we limit the length of paths to 10 above.
      assert set(black_triangle_touch_forms) == set(
          [
              "(object_exists (black (triangle (touch_wall all_objects))))",
              "(object_exists (black (touch_wall (triangle all_objects))))",
              "(object_exists (triangle (black (touch_wall all_objects))))",
              "(object_exists (triangle (touch_wall (black all_objects))))",
              "(object_exists (touch_wall (black (triangle all_objects))))",
              "(object_exists (touch_wall (triangle (black all_objects))))",
          ]
      )
  
file_path: magnitude/pymagnitude/third_party/allennlp/tests/semparse/action_space_walker_test.py
imports: from __future__ import absolute_import
  from nltk.sem.logic import TRUTH_TYPE
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.semparse.worlds.world import World
  from allennlp.semparse import ActionSpaceWalker
label_desc: Use image node_id 2 for calling the ActionSpaceWalkerTest obj's underlying member method code with example usage: obj.test_get_logical_forms_with_agenda() without return types