def _find_toggle_methods(self, klass, methods):
        """Find/store methods of the form <Value>{On,Off} in the given
        `methods`.  Returns the remaining list of methods.

        """
        meths = methods[:]
        tm = self.toggle_meths
        for method in meths[:]:
            if method[-2:] == 'On':
                key = method[:-2]
                if (key + 'Off') in meths and ('Get' + key) in meths:
                    tm[key] = None
                    meths.remove(method)
                    meths.remove(key + 'Off')
                    self._remove_method(meths, 'Set' + key)
                    self._remove_method(meths, 'Get' + key)
        # get defaults
        if tm:
            obj = self._get_instance(klass)
            if obj:
                for key in tm:
                    try:
                        tm[key] = getattr(obj, 'Get%s'%key)()
                    except __HOLE__, e:
                        log("Type error during parsing: class %s will not expose method %s " % (klass.__name__, key))
                    except AttributeError, e:
                        log("Attribute error during parsing: class %s will not expose method %s " % (klass.__name__, key))
        return meths
dataset/ETHPy150Open VisTrails/VisTrails/contrib/titan/vtk_parser.py/VTKMethodParser._find_toggle_methods