human
I found an interesting problem on https://www.codewars.com/kata/585b373ce08bae41b800006e:
# Task

 Your task is to create a `Funnel` data structure. It consists of three basic methods: `fill()`, `drip()` and `toString()/to_s/__str__`. Its maximum capacity is 15 data.
 
 Data should be arranged in an inverted triangle, like this:
 ```
 \1 2 3 4 5/
  \7 8 9 0/
   \4 5 6/
    \2 3/
     \1/
 ```
 The string method should return a multi-line string to display current funnel data arrangement:
   ```python
 funnel = Funnel()
 print(funnel)
  \         /
   \       /
    \     /
     \   /
      \ /
```

 The method `fill()` should accept one or more arguments to fill in the funnel:

  ```python
 funnel = Funnel()
 funnel.fill(1)
 print (funnel)
  \         /
   \       /
    \     /
     \   /
      \1/
 funnel.fill(2)
 print (funnel)
  \         /
   \       /
    \     /
     \2  /
      \1/
 funnel.fill(3)
 print (funnel)
  \         /
   \       /
    \     /
     \2 3/
      \1/
 funnel.fill(4,5)
 print (funnel)
  \         /
   \       /
    \4 5  /
     \2 3/
      \1/
 funnel.fill(6,7,8,9)
 print(funnel)
  \         /
   \7 8 9  /
    \4 5 6/
     \2 3/
      \1/
 ```
  In each row, `fill()` always fill data from left to right.
 
 The method `drip()` should drip the bottom value out of funnel and returns this value:
   ```python
 (continue the example above)
 v = funnel.drip()
 print(v)
 1
 print(funnel)
  \         /
   \  8 9  /
    \7 5 6/
     \4 3/
      \2/
 ```
  
As you can see, the bottom 1 was dripping out. The number above it will fill it's place. The rules to fill are: Select one of the two numbers above it, which bear the "weight" of relatively large. In other words, there are more numbers on this number. Is this a bit hard to understand? Please see the following:
 
```
 In the example above, before the execution of drip(), funnel is:
  \         /
   \7 8 9  /
    \4 5 6/
     \2 3/
      \1/
 ```
 * After drip(), 1 will be dripped out. 
 * We should choose a number between 2 and 3 to fill the place of 1.
 * 2 has 5 numbers on it(4,5,7,8,9). 3 has 4 numbers on it(5,6,8,9)
 * So we...

I tried it in Python, but could not do it. Can you solve it?
assistant
#Here is Python code to print (funnel)
.

class Node(object):
    def __init__(self, value=None, left_child=None, right_child=None):
        self.value = None if value is None else str(value)
        self.left_child = left_child
        self.right_child = right_child
        self.visited = False

    def is_empty(self):
        return self.value is None

    def has_value(self):
        return self.value is not None

    def is_top_level(self):
        return self.left_child is None

    def is_leaf(self):
        return self.is_top_level() or not (self.left_child.has_value() or self.right_child.has_value())

    def num_children_recursive(self):
        if self.is_empty():
            return 0

        if self.is_top_level():
            return 1

        children = [p for p in [self.left_child, self.right_child] if p.has_value() and not p.visited]
        for child in children:
            child.visited = True
        return (1 if self.has_value() else 0) + sum(p.num_children_recursive() for p in children)

    def drip(self):
        original_value = self.value

        if self.is_empty() or self.is_top_level():
            self.value = None
        else:
            num_children_left = self.left_child.num_children_recursive()
            self.reset_visited_recursive()
            num_children_right = self.right_child.num_children_recursive()
            self.reset_visited_recursive()

            if num_children_left >= num_children_right:
                self.value = self.left_child.drip()
            else:
                self.value = self.right_child.drip()

        return original_value

    def reset_visited_recursive(self):
        self.visited = False

        if not self.is_top_level():
            self.left_child.reset_visited_recursive()
            self.right_child.reset_visited_recursive()

    def __str__(self):
        return str(self.value) if self.has_value() else ' '

class Funnel(object):
    def __init__(self):
        self.count = 0
        # create and link up nodes for each funnel value space
        prev_level = [Node()...