code: def binding(key, registry=None):
      
      if registry is None:
          registry = _registry
  
      def decorator(func):
          registry.bind(key, func)
          return func
      return decorator
docs: Creates a decorator that binds a factory function to a key.
  
      :param key: the binding key
      :param: registry: the registry to bind to; defaults to the global registry