code: def from_config(cls, cfg, **kwargs):
          
          cfg = dict(cfg, **kwargs)
          pythonpath = cfg.get('pythonpath', [])
          if 'here' in cfg:
              pythonpath.append(cfg['here'])
          for path in pythonpath:
              sys.path.append(os.path.expanduser(path))
          prog = cls.server and 'irc3d' or 'irc3'
          if cfg.get('debug'):
              cls.venusian_categories.append(prog + '.debug')
          if cfg.get('interactive'):  # pragma: no cover
              import irc3.testing
              context = getattr(irc3.testing, cls.__name__)(**cfg)
          else:
              context = cls(**cfg)
          if cfg.get('raw'):
              context.include('irc3.plugins.log',
                              venusian_categories=[prog + '.debug'])
          return context
docs: return an instance configured with the ``cfg`` dict