code: def replace_math_symbols(s):
      while True:
          s, replaced = re.subn(r"(\W)pi(\W)", r"\1π\2", s, 1)
          if not replaced:
              break
  
      while True:
          s, replaced = re.subn(r"(\W)inf(\W)", r"\1∞\2", s, 1)
          if not replaced:
              break
  
      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 1 for calling a global function with example usage: replace_math_symbols(s) and returns: s