class_docstr: Extend IPython kernel for parallel computing
class_docstr_tok: ["Extend","IPython","kernel","for","parallel","computing"]
docstr: Check whether a shell-channel message should be handled
  
  Allows subclasses to prevent handling of certain messages (e.g. aborted requests).
docstr_tok: ["Check","whether","a","shell-channel","message","should","be","handled","Allows","subclasses","to","prevent","handling","of","certain","messages","(","e.g",".","aborted","requests",")","."]
code: def should_handle(self, stream, msg, idents):
      """Check whether a shell-channel message should be handled
  
      Allows subclasses to prevent handling of certain messages (e.g. aborted requests).
      """
      if not super().should_handle(stream, msg, idents):
          return False
      msg_id = msg["header"]["msg_id"]
      msg_type = msg["header"]["msg_type"]
      if msg_id in self.aborted:
          # is it safe to assume a msg_id will not be resubmitted?
          self.aborted.remove(msg_id)
          self._send_abort_reply(stream, msg, idents)
          return False
      self.log.info(f"Handling {msg_type}: {msg_id}")
      return True
  
imports: import asyncio
  import inspect
  import sys
  from functools import partial
  import ipykernel
  from ipykernel.ipkernel import IPythonKernel
  from traitlets import Integer, Type
  from ipyparallel.serialize import serialize_object, unpack_apply_message
  from ipyparallel.util import utcnow
  from .datapub import ZMQDataPublisher
label_desc: Use image node_id 5 for calling the IPythonParallelKernel obj's underlying member method code with example usage: obj.should_handle(stream, msg, idents) and returns: True, False, False