code: def cycle_windows(tree, direction):
      
      wanted = {
          "orientation": ("vertical" if direction in ("up", "down")
                          else "horizontal"),
          "direction": (1 if direction in ("down", "right")
                        else -1),
      }
      split = find_parent_split(tree.focused.parent, wanted["orientation"])
  
      if split:
          # Get the next child given the direction
          child_ids = [child.id for child in split.children]
          focus_idx = child_ids.index(split.focused_child.id)
          next_idx = (focus_idx + wanted['direction']) % len(child_ids)
          next_node = split.children[next_idx]
          return find_focusable(next_node)
      return None
docs: Cycle through windows of the current workspace