'If location_b is not already in the treestore under location_a, add it.
If location_b is in the treestore, make sure we paint it the right
color.
Update the child count, keep in mind that the child count for this
level is increased by each call to this method.'

def _handle_second_level(self, data):

    location_a = [r for r in self.treestore if (r[1] == data.location_a)]
    assert len(location_a), 1
    location_a_row = location_a[0]
    contains_location_ab = [r for r in location_a_row.iterchildren() if (r[1] == data.location_b)]
    if (not contains_location_ab):
        child_count = '(    1    )'
        color = helpers.KB_COLORS[data.color_level]
        a_iter = location_a_row.iter
        store_iter = self.treestore.append(a_iter, [None, data.location_b, 0, None, 0, color, child_count])
    else:
        location_b_rows = [r for r in location_a_row.iterchildren() if (r[1] == data.location_b)]
        assert len(location_b_rows), 1
        location_b_row = location_b_rows[0]
        store_iter = location_b_row.iter
        location_b_row_children = [r for r in location_b_row.iterchildren()]
        child_count = ('(    %s    )' % (len(location_b_row_children) + 1))
        self.treestore[store_iter][6] = child_count
    if (data.color_level > self.treestore[store_iter][4]):
        color = helpers.KB_COLORS[data.color_level]
        self.treestore[store_iter][5] = color
