code: def init(backend_name):
      global session
      if session is not None:
          raise Exception("Function `init()` can be only invoked once.")
      if not re.match("^[a-zA-Z0-9]+$", backend_name):
          raise Exception(
              "Only letters and digits are allowed for backend_name, get: %s"
              % backend_name
          )
      session = init
      session.backend = importlib.import_module(
          "..backend.%s.config" % backend_name, __name__
      )
      session.is_strict_fmt = int(os.environ.get("STRICT_FMT", 0)) > 0
      session.ptype = os.environ.get("PTYPE", "")
      session.custom_dict = dict()
  
      manual_config = os.environ.get("CONFIG", "")
      manual_config = json.loads(manual_config) if manual_config else {}
      manual_config = dict(
          [
              (
                  x,
                  manual_config[x]
                  if isinstance(manual_config[x], int)
                  else manual_config[x][0],
              )
              for x in manual_config
          ]
      )
      session.manual_config = manual_config
      try:
          extra = importlib.import_module(
              "..backend.%s" % backend_name, __name__
          )
      except:
          extra = None
      return extra
  
imports: import os, sys, json, re
  import tempfile
  import copy
  import inspect
  import logging
  import importlib
  from .None import solver
  from .None import patterns
label_desc: Use image node_id 1 for calling a global function with example usage: init(backend_name) and returns: extra