class_docstr: Generates markdown labels for LLMThought containers. Pass a custom
  subclass of this to StreamlitCallbackHandler to override its default
  labeling logic.
class_docstr_tok: ["Generates","markdown","labels","for","LLMThought","containers",".","Pass","a","custom","subclass","of","this","to","StreamlitCallbackHandler","to","override","its","default","labeling","logic","."]
docstr: Return the label for an LLMThought that has an associated
  tool.
  
  Parameters
  ----------
  tool
      The tool's ToolRecord
  
  is_complete
      True if the thought is complete; False if the thought
      is still receiving input.
  
  Returns
  -------
  The markdown label for the thought's container.
docstr_tok: ["Return","the","label","for","an","LLMThought","that","has","an","associated","tool",".","Parameters","--","--","--","--","--","tool","The","tool","'s","ToolRecord","is_complete","True","if","the","thought","is","complete",";","False","if","the","thought","is","still","receiving","input",".","Returns","--","--","--","-","The","markdown","label","for","the","thought","'s","container","."]
code: def get_tool_label(self, tool: ToolRecord, is_complete: bool) -> str:
      """Return the label for an LLMThought that has an associated
      tool.
  
      Parameters
      ----------
      tool
          The tool's ToolRecord
  
      is_complete
          True if the thought is complete; False if the thought
          is still receiving input.
  
      Returns
      -------
      The markdown label for the thought's container.
  
      """
      input_str = tool.input_str
      name = tool.name
      if name == "_Exception":
          name = "Parsing error"
      input_str_len = min(MAX_TOOL_INPUT_STR_LENGTH, len(input_str))
      input_str = input_str[:input_str_len]
      if len(tool.input_str) > input_str_len:
          input_str = input_str + "..."
      input_str = input_str.replace("\n", " ")
      return f"**{name}:** {input_str}"
  
imports: from __future__ import annotations
  import time
  from enum import Enum
  from typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, Optional
  from langchain.callbacks.base import BaseCallbackHandler
  from langchain.schema import AgentAction, AgentFinish, LLMResult
  from streamlit.runtime.metrics_util import gather_metrics
label_desc: Use image node_id 2 for calling the LLMThoughtLabeler obj's underlying member method code with example usage: obj.get_tool_label(tool, is_complete) and returns: str, name, str, input_str