def _get_options(self, kind, module_name):
    configs = [
      config
      for config in self.config.get(kind, [])
      if module_name in config.get('modules', [])
    ]
    if len(configs) == 1:
      config = configs[0]
      def letters_generator(modules):
        for letters in map(set, zip(*modules)):
          if len(letters) == 1:
            yield letters.pop()
          else:
            return
      name = ''.join(letters_generator(config['modules'])).rstrip('.')
      return name, config
    elif len(configs) > 1:
      raise KitError('Duplicate %s for module %r found.' % (kind, module_name))
    else:
      raise KitError('Undefined %s for module  %r.' % (kind, module_name))
Attempts to the stop the kernel process cleanly. If the kernel
dataset/ETHPy150Open mtth/kit/kit/base.py/Kit._get_options--crossover with--dataset/ETHPy150Open ipython/ipython-py3k/IPython/parallel/engine/kernelstarter.py/KernelStarter.shutdown_kernel