code: def make_snapshot(
      engine: Any,
      file_name: str,
      output_name: str,
      delay: float = 2,
      pixel_ratio: int = 2,
      is_remove_html: bool = False,
      **kwargs,
  ):
      logger.info("Generating file ...")
      file_type = output_name.split(".")[-1]
  
      content = engine.make_snapshot(
          html_path=file_name,
          file_type=file_type,
          delay=delay,
          pixel_ratio=pixel_ratio,
          **kwargs,
      )
      if file_type in [SVG_FORMAT, B64_FORMAT]:
          save_as_text(content, output_name)
      else:
          # pdf, gif, png, jpeg
          content_array = content.split(",")
          if len(content_array) != 2:
              raise OSError(content_array)
  
          image_data = decode_base64(content_array[1])
  
          if file_type in [PDF_FORMAT, GIF_FORMAT, EPS_FORMAT]:
              save_as(image_data, output_name, file_type)
          elif file_type in [PNG_FORMAT, JPG_FORMAT]:
              save_as_png(image_data, output_name)
          else:
              raise TypeError(f"Not supported file type '{file_type}'")
  
      if "/" not in output_name:
          output_name = os.path.join(os.getcwd(), output_name)
  
      if is_remove_html and not file_name.startswith("http"):
          os.unlink(file_name)
      logger.info(f"File saved in {output_name}")
  
file_path: pyecharts/pyecharts/render/snapshot.py
imports: import base64
  import codecs
  import logging
  import os
  from io import BytesIO
  from ..types import Any
label_desc: Use image node_id 1 for calling a global function with example usage: make_snapshot(engine, file_name, output_name, delay, pixel_ratio, is_remove_html) without return types