class_docstr: Base class for configurable interfaces.
  
  A configurable interface is an (abstract) class whose constructor
  acts as a factory function for one of its implementation subclasses.
  The implementation subclass as well as optional keyword arguments to
  its initializer can be set globally at runtime with `configure`.
  
  By using the constructor as the factory method, the interface
  looks like a normal class, `isinstance` works as usual, etc.  This
  pattern is most useful when the choice of implementation is likely
  to be a global decision (e.g. when `~select.epoll` is available,
  always use it instead of `~select.select`), or when a
  previously-monolithic class has been split into specialized
  subclasses.
  
  Configurable subclasses must define the class methods
  `configurable_base` and `configurable_default`, and use the instance
  method `initialize` instead of ``__init__``.
  
  .. versionchanged:: 5.0
  
     It is now possible for configuration to be specified at
     multiple levels of a class hierarchy.
class_docstr_tok: ["Base","class","for","configurable","interfaces",".","A","configurable","interface","is","an","(","abstract",")","class","whose","constructor","acts","as","a","factory","function","for","one","of","its","implementation","subclasses",".","The","implementation","subclass","as","well","as","optional","keyword","arguments","to","its","initializer","can","be","set","globally","at","runtime","with","`","configure","`",".","By","using","the","constructor","as","the","factory","method",",","the","interface","looks","like","a","normal","class",",","`","isinstance","`","works","as","usual",",","etc",".","This","pattern","is","most","useful","when","the","choice","of","implementation","is","likely","to","be","a","global","decision","(","e.g",".","when","`","~select.epoll","`","is","available",",","always","use","it","instead","of","`","~select.select","`",")",",","or","when","a","previously-monolithic","class","has","been","split","into","specialized","subclasses",".","Configurable","subclasses","must","define","the","class","methods","`","configurable_base","`","and","`","configurable_default","`",",","and","use","the","instance","method","`","initialize","`","instead","of","``","__init__","``",".","..","versionchanged",":",":","5.0","It","is","now","possible","for","configuration","to","be","specified","at","multiple","levels","of","a","class","hierarchy","."]
docstr: Returns the currently configured class.
code: def configured_class(cls):
      # type: () -> Type[Configurable]
      """Returns the currently configured class."""
      base = cls.configurable_base()
      # Manually mangle the private name to see whether this base
      # has been configured (and not another base higher in the
      # hierarchy).
      if base.__dict__.get("_Configurable__impl_class") is None:
          base.__impl_class = cls.configurable_default()
      if base.__impl_class is not None:
          return base.__impl_class
      else:
          # Should be impossible, but mypy wants an explicit check.
          raise ValueError("configured class not found")
  
imports: import array
  import asyncio
  import atexit
  from inspect import getfullargspec
  import os
  import re
  import typing
  import zlib
  from typing import Any, Optional, Dict, Mapping, List, Tuple, Match, Callable, Type, Sequence
label_desc: Use image node_id 6 for calling the Configurable obj's underlying member method code with example usage: obj.configured_class(cls) and returns: base