code: def get_module(path):
      
      try:
          from importlib import import_module
      except ImportError as e:
          from django.utils.importlib import import_module
  
      try:
          mod_name, func_name = path.rsplit('.', 1)
          mod = import_module(mod_name)
      except ImportError as e:
          raise ImportError(
              'Error importing alert function {0}: "{1}"'.format(mod_name, e))
  
      try:
          func = getattr(mod, func_name)
      except AttributeError:
          raise ImportError(
              ('Module "{0}" does not define a "{1}" function'
                              ).format(mod_name, func_name))
  
      return func
docs: A modified duplicate from Django's built in backend
      retriever.
  
          slugify = get_module('django.template.defaultfilters.slugify')