code: def text_abbreviate(
      text, max_length, skip_chars="[!@#$=., _^*]", split_char="="
  ):
      if max_length < 1:
          return text
      max_length = int(max_length)
      ## split text to two parts (1st before last split char, second after)
      txt = text.rsplit(split_char, 1)
      # get var_name as 1st part
      var_name = txt[0]
  
      if len(var_name) <= max_length:
          return text
      # skip skip_chars from var_name
      var_name = re.sub(skip_chars, "", var_name)
      if len(var_name) <= max_length:
          return var_name + "=" + txt[1]
      abbreviate_index = set()
      # get all upper case chars and numbers
      for i, char in enumerate(var_name):
          if char == char.upper():
              abbreviate_index.add(i)
      if len(abbreviate_index) == 0:
          abbreviate_index.add(0)
      uppers_set = deepcopy(abbreviate_index)
      curr_len = len(abbreviate_index)
  
      if curr_len < max_length:
          i = 1
          while curr_len < max_length:
              for ind in uppers_set:
                  if curr_len < max_length:
                      if ind + i not in abbreviate_index:
                          abbreviate_index.add(ind + i)
                          curr_len += 1
  
              i += 1
      abbreviate = ""
      for ind in sorted(abbreviate_index):
          abbreviate += var_name[ind]
      return abbreviate[:max_length] + " =" + txt[1]
  
file_path: DALEX/python/dalex/dalex/aspect/_predict_triplot/utils.py
imports: import numpy
  import pandas
  import itertools
  from copy import deepcopy
  import re
  from dalex.aspect._predict_aspect_importance.utils import calculate_predict_aspect_importance, calculate_shap_predict_aspect_importance
label_desc: Use image node_id 5 for calling a global function with example usage: text_abbreviate(text, max_length, skip_chars, split_char) and returns: unknown, text, text, unknown