code: def view_experiment(args):
      exp_id = args.id
      port = args.port
      exp_dir = args.experiment_dir
  
      # NOTE: Backward compatibility
      config_json = get_stopped_experiment_config_json(exp_id, exp_dir)
      if config_json.get("trainingServicePlatform"):
          legacy_launcher.view_experiment(args)
          exit()
  
      config = ExperimentConfig(**config_json)
      if type(config) != ExperimentConfig:
          _logger.warning(
              "Non-HPO experiment detected. "
              "Though `nnictl view` is designed to be agnostic to experiment types, it is only tested to view HPO experiments. "
              "Report an issue if you encounter any problem."
          )
  
      Experiment(config, id=exp_id).view(port, non_blocking=True)
  
file_path: nni/nni/tools/nnictl/launcher.py
imports: import logging
  from pathlib import Path
  from colorama import Fore
  import yaml
  from nni.experiment import Experiment, RunMode
  from nni.experiment.config import ExperimentConfig, convert, utils
  from nni.experiment.launcher import get_stopped_experiment_config_json
  from .None import legacy_launcher
label_desc: Use image node_id 3 for calling a global function with example usage: view_experiment(args) without return types