<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_environment() -> Environment: """ Returns the jinja2 templating environment updated with the most recent cauldron environment configurations :return: """


    env = JINJA_ENVIRONMENT

    loader = env.loader
    resource_path = environ.configs.make_path(
        'resources', 'templates',
        override_key='template_path'
    )

    if not loader:
        env.filters['id'] = get_id
        env.filters['latex'] = get_latex

    if not loader or resource_path not in loader.searchpath:
        env.loader = FileSystemLoader(resource_path)

    return env