def create(self, class_names=None):
        if class_names is None:
            class_names = []
            for m in self.modules:
                class_names.extend(dir(m))
        
        # Generate the nodes.
        for name in class_names:
            klass = self.get_class(name)
            if klass and hasattr(klass, '__bases__'):
                self._generate_hierarchy(klass)

        # Compute the inheritance level and store the nodes in the tree.
        for node in self:
            d = node.get_level()
            while len(self.tree) <= d:
                self.tree.append([])
            self.tree[d].append(node)

        # Sort the nodes alphabetically.
        def _comp(x, y):
            return cmp(x.name, y.name)
        for nodes in self.tree:
            nodes.sort(_comp)
This method generates the class tree given an optional list
dataset/ETHPy150Open VisTrails/VisTrails/contrib/titan/class_tree.py/ClassTree.create