def tno_get_children ( self, node ):
        """ Gets the object's children.

            We overwrite this method for a nicer label on the objects.
        """
        node_for = self.node_for
        items    = list(self.value.items())
        items.sort( lambda l, r: cmp( l[0], r[0] ) )
        if len( items ) > 500:
            return ([ self.node_for( k, v ) for k, v in items[: 250 ] ] +
                    [ StringNode( value = '...', readonly = True ) ]        +
                    [ self.node_for( k, v ) for k, v in items[ -250: ] ])

        return [ self.node_for( k, v ) for k, v in items ]



################################################################################
dataset/ETHPy150Open enthought/envisage/envisage/plugins/ipython_shell/view/namespace_view.py/NamespaceNode.tno_get_children/original