<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def default_tree_traversal(root, leaves):
 """ default tree traversal """

    objs = [('#', root)]
    while len(objs) > 0:
        path, obj = objs.pop()

        # name of child are json-pointer encoded, we don't have
        # to encode it again.
        if obj.__class__ not in leaves:
            objs.extend(map(lambda i: (path + '/' + i[0],) + (i[1],), six.iteritems(obj._children_)))

        # the path we expose here follows JsonPointer described here
        #   http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07
        yield path, obj