code: def hiplot_render_main() -> int:
      parser = argparse.ArgumentParser(
          prog="HiPlot",
          description="Render an HiPlot experiment to HTML or CSV in the standard output",
      )
      parser.add_argument("experiment_uri", type=str)
      parser.add_argument(
          "--format",
          default="html",
          choices=["csv", "html"],
          help="File format",
      )
      parser.add_argument(
          "fetchers",
          nargs="*",
          type=str,
          help="Additional fetchers to use",
      )
      args = parser.parse_args()
  
      exp = fetchers.load_xp_with_fetchers(
          fetchers.get_fetchers(args.fetchers), args.experiment_uri
      )
      exp.validate()
      stdout_writer = codecs.getwriter("utf-8")(sys.stdout.buffer)
      if args.format == "csv":
          exp.to_csv(stdout_writer)
      elif args.format == "html":
          exp.to_html(stdout_writer)
      else:
          assert False, args.format
      return 0
  
file_path: hiplot/hiplot/render.py
imports: import sys
  import argparse
  import uuid
  import base64
  import json
  from typing import Any, Dict
  from pathlib import Path
  import codecs
  from .None import fetchers
label_desc: Use image node_id 6 for calling a global function with example usage: hiplot_render_main() and returns: int