code: def get_instance(args):
      config_file = args.settings
      if config_file is None and os.path.isfile(DEFAULT_CONFIG_NAME):
          config_file = DEFAULT_CONFIG_NAME
          args.settings = DEFAULT_CONFIG_NAME
  
      settings = read_settings(config_file, override=get_config(args))
  
      cls = settings["PELICAN_CLASS"]
      if isinstance(cls, str):
          module, cls_name = cls.rsplit(".", 1)
          module = __import__(module)
          cls = getattr(module, cls_name)
  
      return cls(settings), settings
  
imports: import argparse
  import importlib.metadata
  import json
  import logging
  import multiprocessing
  import os
  import pprint
  import sys
  import time
  import traceback
  from collections.abc import Iterable
  from pkgutil import extend_path
  from pelican.log import console
  from pelican.log import init
  from pelican.generators import ArticlesGenerator, PagesGenerator, SourceFileGenerator, StaticGenerator, TemplatePagesGenerator
  from pelican.plugins import signals
  from pelican.plugins._utils import get_plugin_name, load_plugins
  from pelican.readers import Readers
  from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer
  from pelican.settings import read_settings
  from pelican.utils import clean_output_dir, maybe_pluralize, wait_for_changes
  from pelican.writers import Writer
label_desc: Use image node_id 3 for calling a global function with example usage: get_instance(args) and returns: cls,  settings