def _get_instance(self, klass):
        """Given a VTK class, `klass`, returns an instance of the
        class.

        If the class is abstract, it uses the class tree to return an
        instantiable subclass.  This is necessary to get the values of
        the 'state' methods and the ranges for the Get/Set methods.
        
        """
        obj = None
        try:
            obj = klass()
        except __HOLE__:
            if self._tree:
                t = self._tree
                n = t.get_node(klass.__name__)
# Wendel
                if n == None:
                    return False
                for c in n.children:
                    obj = self._get_instance(t.get_class(c.name))
                    if obj:
                        break
        return obj
dataset/ETHPy150Open VisTrails/VisTrails/contrib/titan/vtk_parser.py/VTKMethodParser._get_instance