code: def format_str(s):
      s = s.replace("/*", "")
      s = s.replace("*/", "")
      s = s.replace("*", "")
      lines = s.split("\n")
  
      # Drop the last and first lines as they are blank contains the function def
      lines = lines[1:-1]
  
      # Strip whitespace
      for i in range(len(lines)):
          lines[i] = lines[i].lstrip()
  
      # Get paragraphs
      docstring = []
      p = ""
      params = False
      for i in range(len(lines)):
          if lines[i].isspace() or lines[i] == "":
              docstring.append("\n".join(wrap(p, 76)))
              docstring.append("")
              p = ""
          elif lines[i].startswith(r"\note"):
              if p != "":
                  docstring.append("\n".join(wrap(p, 76)))
                  docstring.append("")
              docstring.append("Note:")
              p = lines[i][6:]
          elif lines[i].startswith("@param"):
              if p != "":
                  docstring.append("\n".join(wrap(p, 76)))
                  docstring.append("")
              if not params:
                  docstring.append("Inputs:")
              p = lines[i][6:].lstrip()
          elif lines[i].startswith("@return"):
              if p != "":
                  docstring.append("\n".join(wrap(p, 76)))
              docstring.append("Raises:")
              p = ""
          elif lines[i].startswith(r"- \ref"):
              p += lines[i][7:]
          else:
              p = p + lines[i]
  
      return "\n".join(docstring)
  
label_desc: Use image node_id 1 for calling a global function with example usage: format_str(s) and returns: str