@staticmethod<EOL><INDENT>def func(generator):<DEDENT>
return Pipe(generator)<EOL>
Wrap a generator function to Pipe object.

        :param generator: The generator function to be wrapped.
        :type generator: generator
        :returns: Pipe object