code: def replace_link_ids(render: str) -> str:
      """Link IDs have a random ID and system path which is a problem for
      reproducible tests.
  
      """
      return re_link_ids.sub("id=0;foo\x1b", render)
  
imports: import io
  import re
  from rich.console import Console, RenderableType
label_desc: Use image node_id 1 for calling a global function with example usage: replace_link_ids(render) and returns: re_link_ids