class_docstr: The IPython Controller Hub with 0MQ connections
  
  Parameters
  ==========
  loop: zmq IOLoop instance
  session: Session object
  <removed> context: zmq context for creating new connections (?)
  queue: ZMQStream for monitoring the command queue (SUB)
  query: ZMQStream for engine registration and client queries requests (ROUTER)
  heartbeat: HeartMonitor object checking the pulse of the engines
  notifier: ZMQStream for broadcasting engine registration changes (PUB)
  db: connection to db for out of memory logging of commands
              NotImplemented
  engine_info: dict of zmq connection information for engines to connect
              to the queues.
  client_info: dict of zmq connection information for engines to connect
              to the queues.
class_docstr_tok: ["The","IPython","Controller","Hub","with","0MQ","connections","Parameters","==========","loop",":","zmq","IOLoop","instance","session",":","Session","object","<","removed",">","context",":","zmq","context","for","creating","new","connections","(","?",")","queue",":","ZMQStream","for","monitoring","the","command","queue","(","SUB",")","query",":","ZMQStream","for","engine","registration","and","client","queries","requests","(","ROUTER",")","heartbeat",":","HeartMonitor","object","checking","the","pulse","of","the","engines","notifier",":","ZMQStream","for","broadcasting","engine","registration","changes","(","PUB",")","db",":","connection","to","db","for","out","of","memory","logging","of","commands","NotImplemented","engine_info",":","dict","of","zmq","connection","information","for","engines","to","connect","to","the","queues",".","client_info",":","dict","of","zmq","connection","information","for","engines","to","connect","to","the","queues","."]
code: def _purge_stalled_registration(self, heart):
      # flush monitor messages before purging
      # first heartbeat might be waiting to be handled
      self.monitor.flush()
      if heart in self.incoming_registrations:
          ec = self.incoming_registrations.pop(heart)
          self.log.warning(
              f"registration::purging stalled registration {ec.id}:{ec.uuid}"
          )
  
imports: import inspect
  import json
  import os
  import sys
  import time
  from collections import deque
  from datetime import datetime
  import zmq
  from jupyter_client.jsonutil import parse_date
  from jupyter_client.session import Session
  from tornado import ioloop
  from traitlets import Any, Bytes, Dict, Float, HasTraits, Instance, Integer, Set, Unicode, default
  from traitlets.config import LoggingConfigurable
  from zmq.eventloop.zmqstream import ZMQStream
  from ipyparallel import error, util
  from ..util import extract_dates
  from .heartmonitor import HeartMonitor
label_desc: Use image node_id 24 for calling the Hub obj's underlying member method code with example usage: obj._purge_stalled_registration(heart) without return types