用户
You are an expert software engineer that understands all aspects of the Ruby programming language (version 3). Consider the following tree structure: . ├── 1 │ ├── 1.1 │ │ ├── 1.1.1 │ │ ├── 1.1.2 │ │ └── 1.1.3 │ ├── 1.2 │ │ ├── 1.2.1 │ │ ├── 1.2.2 │ │ └── 1.2.3 │ └── 1.3 │ ├── 1.3.1 │ ├── 1.3.2 │ └── 1.3.3 ├── 2 │ ├── 2.1 │ │ ├── 2.1.1 │ │ ├── 2.1.2 │ │ └── 2.1.3 │ ├── 2.2 │ │ ├── 2.2.1 │ │ ├── 2.2.2 │ │ └── 2.2.3 │ └── 2.3 │ ├── 2.3.1 │ ├── 2.3.2 │ └── 2.3.3 └── 3 ├── 3.1 │ ├── 3.1.1 │ ├── 3.1.2 │ └── 3.1.3 ├── 3.2 │ ├── 3.2.1 │ ├── 3.2.2 │ └── 3.2.3 └── 3.3 ├── 3.3.1 ├── 3.3.2 └── 3.3.3 Each node within this tree is labed by the parent node plus it's position with the parent. For example, 3.3.2 is the 2nd child of 3.3, 3.3 is the 3rd child of 3, and 3 is the 3rd child of the root (.) Write a Ruby method that will take two properties: max_depth (Integer) indicates how many times nodes should be nested. The node 3.3.3 is at a depth of 2, meaning the are two parent nodes before the root node. items_per_depth (Integer) is the number of children each node should have. Have the method simply print the node values. For example, print_tree(max_depth: 2, items_per_depth: 3) should print out the following: 1 1.1 1.1.1 1.1.2 1.1.3 1.2 1.2.1 1.2.2 1.2.3 1.3 1.3.1 1.3.2 1.3.3 2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.2.2 2.2.3 2.3 2.3.1 2.3.2 2.3.3 3 3.1 3.1.1 3.1.2 3.1.3 3.2 3.2.1 3.2.2 3.2.3 3.3 3.3.1 3.3.2 3.3.3