code: def main(args):
      """Starts an application that will generate a plot."""
  
      # Note : If you specify no argument at all (except 'kind'),
      #        the default behavior is to plot "{experiment.name}_{kind}.png".
  
      experiment = ExperimentClient(
          experiment_builder.get_from_args(args, mode="r"), None
      )
      output_plot = experiment.plot(kind=args["kind"])
  
      args["type"] = infer_type(args["output"], args["type"])
      args["output"] = get_output(
          experiment, args["output"], args["kind"], args["type"]
      )
  
      if args["type"] in IMAGE_TYPES:
          output_plot.write_image(args["output"], scale=args["scale"])
      elif args["type"] in HTML_TYPES:
          output_plot.write_html(args["output"])
      elif args["type"] in JSON_TYPES:
          with open(args["output"], "w", encoding="utf8") as f_out:
              # Note that this is the content of the "body" in the WebApi.
              f_out.write(output_plot.to_json())
      else:
          raise Exception(
              "This is a bug. You should never land here if the logic is not faulty."
          )
  
file_path: orion/src/orion/core/cli/plot.py
imports: import logging
  from orion.client.experiment import ExperimentClient
  from orion.core.cli import base
  from orion.core.io import experiment_builder
  from orion.plotting.base import SINGLE_EXPERIMENT_PLOTS
label_desc: Use image node_id 4 for calling a global function with example usage: main(args) without return types