code: def insert_content(
      file_path: Path,
      content: list[str],
      header: str,
      footer: str,
      file_name: str,
  ):
      text = file_path.read_text().splitlines(keepends=True)
      replacing = False
      result: list[str] = []
      for line in text:
          if line.startswith(f"{header}{file_name}"):
              replacing = True
              result.append(line)
              result += content
          if line.startswith(footer):
              replacing = False
          if not replacing:
              result.append(line)
          file_path.write_text("".join(result))
  
label_desc: Use image node_id 1 for calling a global function with example usage: insert_content(file_path, content, header, footer, file_name) without return types