code: def truncate_str_from_middle(s, max_length):
      assert max_length > 5
      if len(s) <= max_length:
          return s
      else:
          left_part_len = (max_length - 3) // 2
          right_part_len = max_length - 3 - left_part_len
          return f"{s[:left_part_len]}...{s[-right_part_len:]}"
  
file_path: mlflow/mlflow/utils/string_utils.py
imports: import os
  import re
  import shlex
  from typing import List
label_desc: Use image node_id 5 for calling a global function with example usage: truncate_str_from_middle(s, max_length) and returns: s, s, str, s