code: def inline_images():
      input_html_path = sys.argv[1]
      image_files = sys.argv[2:]
      with open(input_html_path, "r") as f:
          html = f.read()
      for image_file in image_files:
          with open(image_file, "rb") as f:
              base64_content = base64.b64encode(f.read()).decode(
                  "utf-8"
              )
          data_uri = "data:%s;base64,%s" % (MIME_TYPE, base64_content)
          image_basename = os.path.basename(image_file)
          image_template = "%" + image_basename + "%"
          if image_template not in html:
              raise ValueError(
                  "Cannot find %s in input html file %s"
                  % (image_template, input_html_path)
              )
          html = html.replace(image_template, data_uri)
      sys.stdout.write(html)
  
imports: import base64
  import os
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: inline_images() without return types