class_docstr: Customizable traceback for inclusion debug log messages
      
class_docstr_tok: ["Customizable","traceback","for","inclusion","debug","log","messages"]
docstr: Parameters
  ----------
  collide : bool
    if True, deduplicate a subsequent message by replacing a common
    prefix string with an ellipsis.
docstr_tok: ["Parameters","--","--","--","--","--","collide",":","bool","if","True",",","deduplicate","a","subsequent","message","by","replacing","a","common","prefix","string","with","an","ellipsis","."]
code: def __init__(self, limit=100, collide=False):
      """
      Parameters
      ----------
      collide : bool
        if True, deduplicate a subsequent message by replacing a common
        prefix string with an ellipsis.
      """
      self.__prev = ""
      self.limit = limit
      self.collide = collide
  
      # delayed imports and preparing the regex substitution
      if collide:
          import re
  
          self.__prefix_re = re.compile(">[^>]*$")
      else:
          self.__prefix_re = None
  
imports: from contextlib import contextmanager
  from functools import partial
  import inspect
  import logging
  import os
  import sys
  import platform
  import random
  import logging.handlers
  import warnings
  from os.path import basename, dirname
  from collections import defaultdict
  from .utils import is_interactive, optional_args
  from .support import ansi_colors
label_desc: Use image node_id 1 to create a new TraceBack object from inherited base classes: object with example: obj = TraceBack(limit, collide)