code: def lookup_pattern(name):
      """
      Lookups a registered pattern factory by name.
  
      *name* (:class:`str`) is the name of the pattern factory.
  
      Returns the registered pattern factory (:class:`~collections.abc.Callable`).
      If no pattern factory is registered, raises :exc:`KeyError`.
      """
      return _registered_patterns[name]
  
imports: import os
  import os.path
  import posixpath
  import stat
  from .compat import Collection, Iterable, string_types, unicode
label_desc: Use image node_id 6 for calling a global function with example usage: lookup_pattern(name) and returns: _registered_patterns