class_docstr: Communicates with a single kernel on any host via zmq channels.
  
  There are four channels associated with each kernel:
  
  * shell: for request/reply calls to the kernel.
  * iopub: for the kernel to publish results to frontends.
  * hb: for monitoring the kernel's heartbeat.
  * stdin: for frontends to reply to raw_input calls in the kernel.
  
  The messages that can be sent on these channels are exposed as methods of the
  client (KernelClient.execute, complete, history, etc.). These methods only
  send the message, they don't wait for a reply. To get results, use e.g.
  :meth:`get_shell_msg` to fetch messages from the shell channel.
class_docstr_tok: ["Communicates","with","a","single","kernel","on","any","host","via","zmq","channels",".","There","are","four","channels","associated","with","each","kernel",":","*","shell",":","for","request\/reply","calls","to","the","kernel",".","*","iopub",":","for","the","kernel","to","publish","results","to","frontends",".","*","hb",":","for","monitoring","the","kernel","'s","heartbeat",".","*","stdin",":","for","frontends","to","reply","to","raw_input","calls","in","the","kernel",".","The","messages","that","can","be","sent","on","these","channels","are","exposed","as","methods","of","the","client","(","KernelClient.execute",",","complete",",","history",",","etc.",")",".","These","methods","only","send","the","message",",","they","do","n't","wait","for","a","reply",".","To","get","results",",","use","e.g",".",":","meth",":","`","get_shell_msg","`","to","fetch","messages","from","the","shell","channel","."]
docstr: Get entries from the kernel's history list.
  
  Parameters
  ----------
  raw : bool
      If True, return the raw input.
  output : bool
      If True, then return the output as well.
  hist_access_type : str
      'range' (fill in session, start and stop params), 'tail' (fill in n)
       or 'search' (fill in pattern param).
  
  session : int
      For a range request, the session from which to get lines. Session
      numbers are positive integers; negative ones count back from the
      current session.
  start : int
      The first line number of a history range.
  stop : int
      The final (excluded) line number of a history range.
  
  n : int
      The number of lines of history to get for a tail request.
  
  pattern : str
      The glob-syntax pattern for a search request.
  
  Returns
  -------
  The ID of the message sent.
docstr_tok: ["Get","entries","from","the","kernel","'s","history","list",".","Parameters","--","--","--","--","--","raw",":","bool","If","True",",","return","the","raw","input",".","output",":","bool","If","True",",","then","return","the","output","as","well",".","hist_access_type",":","str","'range","'","(","fill","in","session",",","start","and","stop","params",")",",","'tail","'","(","fill","in","n",")","or","'search","'","(","fill","in","pattern","param",")",".","session",":","int","For","a","range","request",",","the","session","from","which","to","get","lines",".","Session","numbers","are","positive","integers",";","negative","ones","count","back","from","the","current","session",".","start",":","int","The","first","line","number","of","a","history","range",".","stop",":","int","The","final","(","excluded",")","line","number","of","a","history","range",".","n",":","int","The","number","of","lines","of","history","to","get","for","a","tail","request",".","pattern",":","str","The","glob-syntax","pattern","for","a","search","request",".","Returns","--","--","--","-","The","ID","of","the","message","sent","."]
code: def history(
      self, raw=True, output=False, hist_access_type="range", **kwargs
  ):
      """Get entries from the kernel's history list.
  
      Parameters
      ----------
      raw : bool
          If True, return the raw input.
      output : bool
          If True, then return the output as well.
      hist_access_type : str
          'range' (fill in session, start and stop params), 'tail' (fill in n)
           or 'search' (fill in pattern param).
  
      session : int
          For a range request, the session from which to get lines. Session
          numbers are positive integers; negative ones count back from the
          current session.
      start : int
          The first line number of a history range.
      stop : int
          The final (excluded) line number of a history range.
  
      n : int
          The number of lines of history to get for a tail request.
  
      pattern : str
          The glob-syntax pattern for a search request.
  
      Returns
      -------
      The ID of the message sent.
      """
      if hist_access_type == "range":
          kwargs.setdefault("session", 0)
          kwargs.setdefault("start", 0)
      content = dict(
          raw=raw,
          output=output,
          hist_access_type=hist_access_type,
          **kwargs,
      )
      msg = self.session.msg("history_request", content)
      self.shell_channel.send(msg)
      return msg["header"]["msg_id"]
  
imports: from __future__ import absolute_import
  from jupyter_client.channels import major_protocol_version
  from ipython_genutils.py3compat import string_types, iteritems
  import zmq
  from traitlets import Any, Instance, Type
  from .channelsabc import ChannelABC, HBChannelABC
  from .clientabc import KernelClientABC
  from .connect import ConnectionFileMixin
label_desc: Use image node_id 16 for calling the KernelClient obj's underlying member method code with example usage: obj.history(raw, output, hist_access_type) and returns: msg