class_docstr: A class to organize all history-related functionality in one place.
      
class_docstr_tok: ["A","class","to","organize","all","history-related","functionality","in","one","place","."]
docstr: Get a new session number.
docstr_tok: ["Get","a","new","session","number","."]
code: def new_session(self, conn=None):
      """Get a new session number."""
      if conn is None:
          conn = self.db
  
      with conn:
          cur = conn.execute(
              """INSERT INTO sessions VALUES (NULL, ?, NULL,
                              NULL, "") """,
              (datetime.datetime.now(),),
          )
          self.session_number = cur.lastrowid
  
imports: from __future__ import print_function
  import atexit
  import datetime
  import os
  import re
  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 IPython.utils import py3compat
  from traitlets import Any, Bool, Dict, Instance, Integer, List, Unicode, TraitError, default, observe
  from warnings import warn
label_desc: Use image node_id 4 for calling the HistoryManager obj's underlying member method code with example usage: obj.new_session(conn) without return types