docstr: Build a custom module finder that will provide wrapped modules
  on demand.
  
  Parameters
  ----------
  mod_name
       Import name to deliver modules under.
  fast_lib
       Name of package that provides "fast" implementation
  slow_lib
       Name of package that provides "slow" fallback implementation
docstr_tok: ["Build","a","custom","module","finder","that","will","provide","wrapped","modules","on","demand",".","Parameters","--","--","--","--","--","mod_name","Import","name","to","deliver","modules","under",".","fast_lib","Name","of","package","that","provides","``","fast","''","implementation","slow_lib","Name","of","package","that","provides","``","slow","''","fallback","implementation"]
code: def __new__(
      cls,
      mod_name: str,
      fast_lib: str,
      slow_lib: str,
  ):
      """Build a custom module finder that will provide wrapped modules
      on demand.
  
      Parameters
      ----------
      mod_name
           Import name to deliver modules under.
      fast_lib
           Name of package that provides "fast" implementation
      slow_lib
           Name of package that provides "slow" fallback implementation
      """
      if ModuleAcceleratorBase._instance is not None:
          raise RuntimeError(
              "Only one instance of ModuleAcceleratorBase allowed"
          )
      self = object.__new__(cls)
      self.mod_name = mod_name
      self.fast_lib = fast_lib
      self.slow_lib = slow_lib
  
      # When walking the module tree and wrapping module attributes,
      # we often will come across the same object more than once. We
      # don't want to create separate wrappers for each
      # instance, so we keep a registry of all module attributes
      # that we can look up to see if we have already wrapped an
      # attribute before
      self._wrapped_objs = {}
      self._wrapped_objs.update(get_final_type_map())
      self._wrapped_objs.update(get_intermediate_type_map())
      self._wrapped_objs.update(get_registered_functions())
  
      ModuleAcceleratorBase._instance = self
      return self
  
imports: from __future__ import annotations
  import contextlib
  import functools
  import importlib
  import importlib.abc
  import importlib.machinery
  import os
  import pathlib
  import sys
  import threading
  import warnings
  from abc import abstractmethod
  from importlib._bootstrap import _ImportLockContext
  from types import ModuleType
  from typing import Any, ContextManager, Dict, List, NamedTuple
  from typing_extensions import Self
  from .fast_slow_proxy import _FunctionProxy, _is_function_or_method, _Unusable, get_final_type_map, get_intermediate_type_map, get_registered_functions
label_desc: Use image node_id 1 for calling the ModuleAcceleratorBase obj's underlying member method code with example usage: obj.__new__(cls, mod_name, fast_lib, slow_lib) and returns: self