<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_children_labels(self, treepos):
 """Given the treeposition of a node, return the labels of its children."""

        children_labels = []
        node = self.dgtree[treepos]
        for child in node:
            if is_leaf(child):
                # we can't call .label() on a leaf node
                children_labels.append(child)
            else:
                children_labels.append(child.label())
        return children_labels