code: def surround_text(s, char_to_insert):
      leading_whitespace = re.match(r"^(\s*)", s).group(1)
      trailing_whitespace = re.search(r"(\s*)$", s).group(1)
      stripped_string = s.strip()
      modified_string = (
          char_to_insert + stripped_string + char_to_insert
      )
      final_string = (
          leading_whitespace + modified_string + trailing_whitespace
      )
      return final_string
  
file_path: pdf-to-markdown/marker/markdown.py
imports: from marker.schema import MergedLine, MergedBlock, FullyMergedBlock, Page
  import re
  from typing import List
label_desc: Use image node_id 1 for calling a global function with example usage: surround_text(s, char_to_insert) and returns: final_string