code: def move(g, n1, n2, **kwargs):
      
      prev = n1
      curr = n2
      _next = step(g, prev, curr, **kwargs)
  
      yield prev
      yield curr
  
      visited_nodes = set([prev, curr])
      while _next:
          yield _next
          if _next in visited_nodes:
              return
          visited_nodes.add(_next)
          prev = curr
          curr = _next
          _next = step(g, prev, curr, **kwargs)
docs: Step along a graph until it ends or reach an intersection
  
      Example graph:
      Note that edge (1, 2) and (2, 3) are bidirectional, i.e., (2, 1) and
      (3, 2) are also edges
  
      1 -- 2 -- 3 -->-- 5 -->-- 7
                |       |
                ^       v
                |       |
                4       6
  
      >>> list(move(g, 1, 2))
      [1, 2, 3, 5]  # Stops at 5 because you can get to both 6 and 7 from 3
  
      >>> step(g, 1, 2, inbound=True)
      [1, 2, 3]
  
  
      Parameters
      ----------
      Same as step()
  
      Yields
      ------
      Node IDs until either there is no path forward or the path reaches
      an intersection