def write_prelims(self, out):
        indent = self.indent
        v = vtk.vtkVersion()
        vtk_version = v.GetVTKVersion()[:3]
        vtk_src_version = v.GetVTKSourceVersion()
        code = """
        import vtk
        from tvtk import tvtk_base
        from tvtk.common import get_tvtk_name, camel2enthought

        # Caches all the classes.
        _cache = {}

        def set_ancestors(klass):
            tmp = klass.__bases__
            if not tmp:
                return
            # Assuming a single inheritance.
            tmp = tmp[0]
            name = tmp.__name__
            while name not in _cache and \
                    name not in ['TVTKBase', 'object']:
                _cache[name] = tmp
                tmp = tmp.__bases__[0]
                name = tmp.__name__

        def get_module(fname):
            try:
                mod = __import__('tvtk.custom.%%s'%%fname,
                                 globals(), locals(), [fname])
            except ImportError:
                # This is a local import since the tvtk modules are all
                # inside the tvtk_classes ZIP file and are local to the
                # current module: tvtk_helper.py
                mod = __import__('tvtk.tvtk_classes.%%s'%%fname, globals(), locals(), [fname])
            return mod

        def get_class(name):
            if name in _cache:
                return _cache[name]
            else:
                fname = camel2enthought(name)
                mod = get_module(fname)
                klass = getattr(mod, name)
                _cache[name] = klass
                set_ancestors(klass)
                return klass

        def wrap_vtk(obj):
            if isinstance(obj, tvtk_base.TVTKBase):
                return obj
            elif isinstance(obj, vtk.vtkObjectBase):
                cached_obj = tvtk_base.get_tvtk_object_from_cache(obj)
                if cached_obj is not None:
                    return cached_obj
                cname = get_tvtk_name(obj.__class__.__name__)
                tvtk_class = get_class(cname)
                return tvtk_class(obj)
            else:
                return obj


        class TVTK(object):
            to_tvtk = staticmethod(wrap_vtk)
            to_vtk = staticmethod(tvtk_base.deref_vtk)

        """%locals()
        out.write(indent.format(code))
        indent.incr()
Getting subscription options is not supported.
dataset/ETHPy150Open enthought/mayavi/tvtk/special_gen.py/HelperGenerator.write_prelims--crossover with--dataset/ETHPy150Open ralphm/wokkel/wokkel/test/test_pubsub.py/PubSubServiceTest.test_on_optionsGet