class_docstr: Manages a single kernel in a subprocess on this host.
  
  This version starts kernels with Popen.
class_docstr_tok: ["Manages","a","single","kernel","in","a","subprocess","on","this","host",".","This","version","starts","kernels","with","Popen","."]
docstr: Wait for kernel shutdown, then kill process if it doesn't shutdown.
  
  This does not send shutdown requests - use :meth:`request_shutdown`
  first.
docstr_tok: ["Wait","for","kernel","shutdown",",","then","kill","process","if","it","does","n't","shutdown",".","This","does","not","send","shutdown","requests","-","use",":","meth",":","`","request_shutdown","`","first","."]
code: def finish_shutdown(self, waittime=None, pollinterval=0.1):
      """Wait for kernel shutdown, then kill process if it doesn't shutdown.
  
      This does not send shutdown requests - use :meth:`request_shutdown`
      first.
      """
      if waittime is None:
          waittime = max(self.shutdown_wait_time, 0)
      for i in range(int(waittime / pollinterval)):
          if self.is_alive():
              time.sleep(pollinterval)
          else:
              break
      else:
          # OK, we've waited long enough.
          if self.has_kernel:
              self.log.debug(
                  "Kernel is taking too long to finish, killing"
              )
              self._kill_kernel()
  
imports: from __future__ import absolute_import
  from contextlib import contextmanager
  import os
  import re
  import signal
  import sys
  import time
  import warnings
  import zmq
  from ipython_genutils.importstring import import_item
  from .localinterfaces import is_local_ip, local_ips
  from traitlets import Any, Float, Instance, Unicode, List, Bool, Type, DottedObjectName
  from jupyter_client import launch_kernel, kernelspec
  from .connect import ConnectionFileMixin
  from .managerabc import KernelManagerABC
label_desc: Use image node_id 22 for calling the KernelManager obj's underlying member method code with example usage: obj.finish_shutdown(waittime, pollinterval) without return types