code: def test_hub_history(self):
      hist = self.client.hub_history()
      recs = self.client.db_query({"msg_id": {"$ne": ""}})
      recdict = {}
      for rec in recs:
          recdict[rec["msg_id"]] = rec
  
      latest = datetime(1984, 1, 1).replace(tzinfo=utc)
      for msg_id in hist:
          rec = recdict[msg_id]
          newt = rec["submitted"]
          assert newt >= latest
          latest = newt
      ar = self.client[-1].apply_async(lambda: 1)
      ar.get()
      time.sleep(0.25)
      assert self.client.hub_history()[-1:] == ar.msg_ids
  
imports: import os
  import signal
  import socket
  import sys
  import time
  import warnings
  from concurrent.futures import Future
  from datetime import datetime
  from threading import Thread
  from unittest import mock
  import pytest
  import tornado
  from IPython import get_ipython
  from ipyparallel import AsyncHubResult, DirectView, Reference, error
  from ipyparallel.client import client
  from ipyparallel.util import utc
  from .clienttest import ClusterTestCase, raises_remote, skip_without, wait
label_desc: Use image node_id 23 for calling the TestClient obj's underlying member method code with example usage: obj.test_hub_history() without return types