def __init__(self, template):
loader = None<EOL>if template:<EOL><INDENT>if isinstance(template, dict):<EOL><INDENT>loader = DictLoader(template)<EOL><DEDENT>elif os.path.isdir(template):<EOL><INDENT>loader = FileSystemLoader(template)<EOL><DEDENT>if loader:<EOL><INDENT>self.env = Environment(loader=loader)<EOL><DEDENT><DEDENT>
:param template: (string | dict) - The directory or dict map of templates
    - as string: A directory
    - as dict: {'index.html': 'source here'}