Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
`template` could be a Template instance or a Sequence of Template instances. If pass a Template Sequence, the inside Template instances will be applied cyclically to the output pages. `seed` could be used for reproducibility. A different implementation of map built-in function (only accept one Iterable though) could be passed to `mapper` to boost the page rendering process, e.g. `multiprocessing.Pool.map`. """ if isinstance(template, Template): templates = (template,) else: templates = template pages = _draft(text, templates, seed) renderer = _Renderer(templates, seed) return mapper(renderer, pages)