class_docstr: A finder and loader that produces "accelerated" modules.
  
  When someone attempts to import the specified slow library with
  this finder enabled, we intercept the import and deliver an
  equivalent, accelerated, version of the module. This provides
  attributes and modules that check if they are being used from
  "within" the slow (or fast) library themselves. If this is the
  case, the implementation is forwarded to the actual slow library
  implementation, otherwise a proxy implementation is used (which
  attempts to call the fast version first).
docstr: Obtain an attribute from a module from either the real or
  wrapped namespace.
  
  Parameters
  ----------
  name
      Attribute to return
  real
      Unwrapped "original" attributes
  wrapped
      Wrapped attributes
  loader
      Loader object that manages denylist and other skipping
  
  Returns
  -------
  The requested attribute (either real or wrapped)
docstr_tok: ["Obtain","an","attribute","from","a","module","from","either","the","real","or","wrapped","namespace",".","Parameters","--","--","--","--","--","name","Attribute","to","return","real","Unwrapped","``","original","''","attributes","wrapped","Wrapped","attributes","loader","Loader","object","that","manages","denylist","and","other","skipping","Returns","--","--","--","-","The","requested","attribute","(","either","real","or","wrapped",")"]
code: def getattr_real_or_wrapped(
      name: str,
      *,
      real: Dict[str, Any],
      wrapped_objs,
      loader: ModuleAccelerator,
  ) -> Any:
      """
      Obtain an attribute from a module from either the real or
      wrapped namespace.
  
      Parameters
      ----------
      name
          Attribute to return
      real
          Unwrapped "original" attributes
      wrapped
          Wrapped attributes
      loader
          Loader object that manages denylist and other skipping
  
      Returns
      -------
      The requested attribute (either real or wrapped)
      """
      with loader._use_fast_lib_lock:
          # Have to hold the lock to read this variable since
          # another thread might modify it.
          # Modification has to happen with the lock held for the
          # duration, so if someone else has modified things, then
          # we block trying to acquire the lock (hence it is safe to
          # release the lock after reading this value)
          use_real = not loader._use_fast_lib
      if not use_real:
          # Only need to check the denylist if we're not turned off.
          frame = sys._getframe()
          # We cannot possibly be at the top level.
          assert frame.f_back
          calling_module = pathlib.PurePath(
              frame.f_back.f_code.co_filename
          )
          use_real = any(
              calling_module.is_relative_to(path)
              for path in loader._denylist
          )
      try:
          if use_real:
              return real[name]
          else:
              return wrapped_objs[real[name]]
      except KeyError:
          raise AttributeError(f"No attribute '{name}'")
      except TypeError:
          # real[name] is an unhashable type
          return real[name]
  
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 4 for calling the ModuleAccelerator obj's underlying member method code with example usage: obj.getattr_real_or_wrapped(name) and returns: real, wrapped_objs, real