Creates a Jinja2 environment with a specific template path.

def create_jinja_env(template_path):
    """
    Creates a Jinja2 environment with a specific template path.
    """
    jinja_env = jinja2.Environment(
        loader=jinja2.FileSystemLoader(template_path),
        block_start_string='{%',
        block_end_string='%}',
        variable_start_string='${',
        variable_end_string='}',
        comment_start_string='{#',
        comment_end_string='#}',
        line_statement_prefix=None,
        line_comment_prefix=None,
        trim_blocks=True,
        lstrip_blocks=True,
        newline_sequence='\n'
    )
    jinja_env.filters['regexreplace'] = regex_replace
    jinja_env.globals.update(uuidgen=uuidgen)
    return jinja_env