code: def get_output(experiment, output, kind, out_type):
      """Create output file name based on experiment name, plot kind and file type.
  
      If the output filename is provided, it is appended with the file type if filename
      does not already has the corresponding extension. (ex output.name -> output.name.png)
      """
  
      if not output:
          return f"{experiment.name}-v{experiment.version}_{kind}.{out_type}"
      elif not output.endswith(f".{out_type}"):
          return f"{output}.{out_type}"
  
      return output
  
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 3 for calling a global function with example usage: get_output(experiment, output, kind, out_type) and returns: output, experiment, str, experiment, str, kind, str, out_type, output, str, out_type