def METHOD_NAME(plugin_instance, settings_module):
    # Instead of just adding the module path to the settings
    # we instantiate an app config object for the plugin
    # and explicitly set its label to its module path.
    # This way, there is no way for a plugin to collide in its
    # label in the Django App Registry with kolibri core apps
    # or Kolibri core plugins.
    app_config = AppConfig.create(plugin_instance.module_path)
    app_config.label = plugin_instance.module_path
    app_config.kolibri_plugin = True
    # Register the plugin as an installed app
    _set_setting_value("INSTALLED_APPS", (app_config,), settings_module)
    plugin_instance.INSTALLED_APPS.append(app_config)
    # Add in the external plugins' locale paths. Our frontend messages depends
    # specifically on the value of LOCALE_PATHS to find its catalog files.
    if is_external_plugin(
        plugin_instance.module_path
    ) and i18n.get_installed_app_locale_path(plugin_instance.module_path):
        _set_setting_value(
            "LOCALE_PATHS",
            (i18n.get_installed_app_locale_path(plugin_instance.module_path),),
            settings_module,
        )