Use this function to enter and exit the context at the beginning and end of a generator.

            Example::

                li = litus.Lists()
                for i in li.generator(range(100)):
                    li.append(i)

def generator(self,gen,*args,**kwargs):
        """
            Use this function to enter and exit the context at the beginning and end of a generator.

            Example::

                li = litus.Lists()
                for i in li.generator(range(100)):
                    li.append(i)

        """
        with self(*args,**kwargs):
            for i in gen:
                yield i