def __init__(self, parent, **kwargs):
        if kwargs in 'filter':
            filter = kwargs['filter']
            if not isinstance(filter, tvtk.Object):
                try:
                    filter = getattr(tvtk, filter)
                except AttributeError:
                    raise Exception('Filter %s unknown to TVTK' % filter)
                kwargs['filter'] = filter()
                self._target.filter = kwargs['filter']
                self._target.setup_filter()
            else:
                self._target.filter = kwargs['filter']
            if not 'name' in kwargs:
                kwargs['name'] = 'UserDefined(%s)' % \
                        kwargs['filter'].__class__.__name__
        super(UserDefinedFactory, self).__init__(parent, **kwargs)
dataset/ETHPy150Open enthought/mayavi/mayavi/tools/filters.py/UserDefinedFactory.__init__/swapped operands of `in`