code: def TR_DESC(s):
      """Escape necessary characters / adjust layout for ReST formatting for the description field"""
      # find all bullet lists which are not preceded by an empty line and adds one (also
      # add 1 at the end just to make sure)
      s = re.sub(r"([^\n])((?:\n[ \t]+-.*)+)", r"\1\n\2\n", s)
  
      # replace '|' when it is used for absolute value
      s = s.replace("|", "\\|")
  
      # replace math constants
      s = replace_math_symbols(s)
  
      # make sure there is always an empty line before the references
      s = s.replace("References:\n", "\nReferences:\n")
  
      # add an empty line in all cases at the end, makes ReST happier when we're in the
      # middle of a bullet list (such as the refs section)
      s = s + "\n\n"
  
      return s
  
file_path: essentia/doc/sphinxdoc/generate_reference.py
imports: import essentia.standard
  import essentia.streaming
  import os, re, subprocess
  import sys
label_desc: Use image node_id 3 for calling a global function with example usage: TR_DESC(s) and returns: s