code: def truncate_text(text, max_len):
      if len(text) > max_len:
          return (
              text[: int(max_len / 2) - 2]
              + "..."
              + text[-int(max_len / 2) + 1 :]
          )
      else:
          return text
  
file_path: shap/shap/plots/_monitoring.py
imports: import matplotlib.pyplot
  import numpy
  import pandas
  import scipy.stats
  from .None import colors
  from ._labels import labels
label_desc: Use image node_id 1 for calling a global function with example usage: truncate_text(text, max_len) and returns: unknown, text