code: def _find_path(maze, from_x, from_y, to_x, to_y):
      """Return a path from (from_x, from_y) to (to_x, to_y) or None."""
      distance_map = _create_distance_map(
          maze, to_x, to_y, from_x, from_y
      )
      if distance_map is None or distance_map[from_x, from_y] < 0:
          return None
  
      path = []
      current_pos = [from_x, from_y]
      distance = distance_map[current_pos[0], current_pos[1]]
  
      offsets = [[-1, 0], [1, 0], [0, -1], [0, 1]]
  
      while distance != 0:
          for offset_x, offset_y in offsets:
              x = current_pos[0] + offset_x
              y = current_pos[1] + offset_y
              if (
                  0 <= x < maze.shape[0]
                  and 0 <= y < maze.shape[1]
                  and distance_map[x, y] == distance - 1
              ):
                  path.append((x, y))
                  current_pos = [x, y]
                  distance -= 1
                  break
  
      return path
  
file_path: lab/python/tests/utils/maze_game_controller.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from python.tests.utils import game_controller
label_desc: Use image node_id 2 for calling a global function with example usage: _find_path(maze, from_x, from_y, to_x, to_y) and returns: path, None