class_docstr: ``ActionSpaceWalker`` takes a world, traverses all the valid paths driven by the valid action
  specification of the world to generate all possible logical forms (under some constraints). This
  class also has some utilities for indexing logical forms to efficiently retrieve required
  subsets.
  
  Parameters
  ----------
  world : ``World``
      The world from which valid actions will be taken.
  max_path_length : ``int``
      The maximum path length till which the action space will be explored. Paths longer than this
      length will be discarded.
code: def get_all_logical_forms(self, max_num_logical_forms=None):
      if self._completed_paths is None:
          self._walk()
      paths = self._completed_paths
      if max_num_logical_forms is not None:
          if self._length_sorted_paths is None:
              self._length_sorted_paths = sorted(
                  self._completed_paths, key=len
              )
          paths = self._length_sorted_paths[:max_num_logical_forms]
      logical_forms = [
          self._world.get_logical_form(path) for path in paths
      ]
      return logical_forms
  
file_path: magnitude/pymagnitude/third_party/allennlp/semparse/action_space_walker.py
imports: from __future__ import absolute_import
  from collections import defaultdict
  from allennlp.common.util import START_SYMBOL
  from allennlp.semparse.worlds.world import World
  from allennlp.semparse.type_declarations import type_declaration
label_desc: Use image node_id 5 for calling the ActionSpaceWalker obj's underlying member method code with example usage: obj.get_all_logical_forms(max_num_logical_forms) and returns: logical_forms