<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cycle_windows(tree, direction):
 """ Cycle through windows of the current workspace """

    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