code: def get_jinja_environment(settings):
      """Sets the environment for Jinja"""
  
      jinja_env = settings.setdefault(
          "JINJA_ENVIRONMENT", DEFAULT_CONFIG["JINJA_ENVIRONMENT"]
      )
  
      # Make sure we include the defaults if the user has set env variables
      for key, value in DEFAULT_CONFIG["JINJA_ENVIRONMENT"].items():
          if key not in jinja_env:
              jinja_env[key] = value
  
      return settings
  
file_path: pelican/pelican/settings.py
imports: import copy
  import importlib.util
  import inspect
  import locale
  import logging
  import os
  import re
  import sys
  from os.path import isabs
  from pathlib import Path
  from pelican.log import LimitFilter
label_desc: Use image node_id 5 for calling a global function with example usage: get_jinja_environment(settings) and returns: settings