code: def update_title(title):
      """
      adapt title content the app layout
      Parameters
      ----------
      title : str
          string to ba adapted
      Returns
      -------
      str
      """
      patt = re.compile("^(.+)<span.+?(Predict: .*|Proba: .*)?</span>$")
      try:
          list_non_empty_str_matches = [
              x for x in patt.findall(title)[0] if x != ""
          ]
          updated = " - ".join(map(str, list_non_empty_str_matches))
      except:
          updated = title
      return updated
  
imports: from dash import dcc
  import re
label_desc: Use image node_id 1 for calling a global function with example usage: update_title(title) and returns: updated