original_docstring: Use assertions that will be written to the logs. This is a recipe from:
          http://code.activestate.com/recipes/577074-logging-asserts/
          
docstring: Use assertions that will be written to the logs.
docstring_tokens: Use assertions that will be written to the logs .
code: def log_assert(self, bool_, msg="", verbose=True):
          """Use assertions that will be written to the logs. This is a recipe from:
          http://code.activestate.com/recipes/577074-logging-asserts/
          """
          try:
              assert bool_, msg
          except AssertionError:
              # construct an exception message from the code of the calling frame
              last_stackframe = inspect.stack()[-2]
              source_file, line_no, func = last_stackframe[1:4]
              source = f"Traceback (most recent call last):\n" + \
                       f" File {source_file}, line {line_no}, in {func}\n"
              if verbose:
                  # include more lines than that where the statement was made
                  source_code = open(source_file).readlines()
                  source += "".join(source_code[line_no - 3:line_no + 1])
              else:
                  source += last_stackframe[-2][0].strip()
              self.logger.debug(f"{msg}\n{source}")
              raise AssertionError(f"{msg}\n{source}")
code_tokens: def log_assert ( self , bool_ , msg = "" , verbose = True ) : try : assert bool_ , msg except AssertionError : last_stackframe = inspect . stack ( ) [ - 2 ] source_file , line_no , func = last_stackframe [ 1 : 4 ] source = f"Traceback (most recent call last):\n" + f" File {source_file}, line {line_no}, in {func}\n" if verbose : source_code = open ( source_file ) . readlines ( ) source += "" . join ( source_code [ line_no - 3 : line_no + 1 ] ) else : source += last_stackframe [ - 2 ] [ 0 ] . strip ( ) self . logger . debug ( f"{msg}\n{source}" ) raise AssertionError ( f"{msg}\n{source}" )
short_docstring: Use assertions that will be written to the logs.
short_docstring_tokens: Use assertions that will be written to the logs .
comment: """Use assertions that will be written to the logs. This is a recipe from:
          http://code.activestate.com/recipes/577074-logging-asserts/
          """$SEP$# construct an exception message from the code of the calling frame$SEP$# include more lines than that where the statement was made