code: def init(**kw):
      
  
      if getattr(__local, '__context', None):
          raise ValueError("fedmsg already initialized")
  
      # Read config from CLI args and a config file
      config = fedmsg.config.load_config([], None)
  
      # Override the defaults with whatever the user explicitly passes in.
      config.update(kw)
  
      __local.__context = fedmsg.core.FedMsgContext(**config)
      return __local.__context
docs: Initialize an instance of :class:`fedmsg.core.FedMsgContext`.
  
      The config is loaded with :func:`fedmsg.config.load_config` and updated
      by any keyword arguments.  This config is used to initialize the context
      object.
  
      The object is stored in a thread local as
      :data:`fedmsg.__local.__context`.