code: def replace_leading_trailing_digits(string, replacement):
      string = re.sub(r"^\d+", replacement, string)
      string = re.sub(r"\d+$", replacement, string)
      return string
  
file_path: pdf-to-markdown/marker/cleaners/headers.py
imports: import re
  from collections import Counter, defaultdict
  from itertools import chain
  from thefuzz import fuzz
  from sklearn.cluster import DBSCAN
  import numpy
  from marker.schema import Page, FullyMergedBlock
  from typing import List, Tuple
label_desc: Use image node_id 4 for calling a global function with example usage: replace_leading_trailing_digits(string, replacement) and returns: string