code: def gen_embedded_lines(pkg, source):
      name = safe_name(pkg.name)
      print("Embedding", source, "as", name)
      yield "// prettier-ignore\n"
      for line in source.read_text().splitlines():
          yield (
              line.replace(
                  "module.exports=function", f"var {name}=function"
              )
              + " // eslint-disable-line\n"
          )
  
file_path: matplotlib/tools/embed_js.py
imports: from collections import namedtuple
  from pathlib import Path
  import re
  import shutil
  import subprocess
  import sys
label_desc: Use image node_id 3 for calling a global function with example usage: gen_embedded_lines(pkg, source) without return types