def get_domain_template(distro, libvirt_ver, **kwargs):
env = Environment(<EOL>loader=PackageLoader('<STR_LIT>', '<STR_LIT>'),<EOL>trim_blocks=True,<EOL>lstrip_blocks=True,<EOL>)<EOL>template_name = '<STR_LIT>'.format(distro)<EOL>try:<EOL><INDENT>template = env.get_template(template_name)<EOL><DEDENT>except TemplateNotFound:<EOL><INDENT>LOGGER.debug('<STR_LIT>', template_name)<EOL>template = env.get_template('<STR_LIT>')<EOL><DEDENT>return template.render(libvirt_ver=libvirt_ver, **kwargs)<EOL>
Get a rendered Jinja2 domain template

Args:
    distro(str): domain distro
    libvirt_ver(int): libvirt version
    kwargs(dict): args for template render

Returns:
    str: rendered template