class_docstr: Access the history database without adding to it.
  
  This is intended for use by standalone history tools. IPython shells use
  HistoryManager, below, which is a subclass of this.
class_docstr_tok: ["Access","the","history","database","without","adding","to","it",".","This","is","intended","for","use","by","standalone","history","tools",".","IPython","shells","use","HistoryManager",",","below",",","which","is","a","subclass","of","this","."]
docstr: validate the db, since it can be an Instance of two different types
docstr_tok: ["validate","the","db",",","since","it","can","be","an","Instance","of","two","different","types"]
code: def _db_changed(self, change):
      """validate the db, since it can be an Instance of two different types"""
      new = change["new"]
      connection_types = (DummyDB, sqlite3.Connection)
      if not isinstance(new, connection_types):
          msg = (
              "%s.db must be sqlite3 Connection or DummyDB, not %r"
              % (self.__class__.__name__, new)
          )
          raise TraitError(msg)
  
imports: import atexit
  import datetime
  from pathlib import Path
  import re
  import sqlite3
  import threading
  from traitlets.config.configurable import LoggingConfigurable
  from decorator import decorator
  from IPython.utils.decorators import undoc
  from IPython.paths import locate_profile
  from traitlets import Any, Bool, Dict, Instance, Integer, List, Unicode, Union, TraitError, default, observe
label_desc: Use image node_id 2 for calling the HistoryAccessor obj's underlying member method code with example usage: obj._db_changed(change) without return types