code: def short_date(date):
      """
      Shorten date string to length of 22
      """
      if isinstance(date, pd.Timestamp):
          # Drop the time of day when midnight or noon
          d = (
              str(date).split(" ")[0]
              if date.hour in [0, 12]
              and date.minute == 0
              and date.second == 0
              else str(date)
          )
      else:
          d = str(date)
  
      return shorten(d, width=22, placeholder="")
  
file_path: popmon/popmon/utils.py
imports: from __future__ import annotations
  import fnmatch
  from textwrap import shorten
  from typing import Callable
  import pandas
  from joblib import Parallel, delayed
label_desc: Use image node_id 1 for calling a global function with example usage: short_date(date) and returns: shorten