code: def _create_torchrun_command(
      input_params: Dict[str, Any], train_path: str, *args: Any
  ) -> List[str]:
      local_mode = input_params["local_mode"]
      num_processes = input_params["num_processes"]
      deepspeed_config = input_params["deepspeed_config"]
      deepspeed_config_path = (
          DeepspeedTorchDistributor._get_deepspeed_config_path(
              deepspeed_config
          )
      )
      (
          torchrun_args,
          processes_per_node,
      ) = TorchDistributor._get_torchrun_args(local_mode, num_processes)
      args_string = list(map(str, args))
      command_to_run = [
          sys.executable,
          "-m",
          "torch.distributed.run",
          *torchrun_args,
          f"--nproc_per_node={processes_per_node}",
          train_path,
          *args_string,
          "--deepspeed",
      ]
  
      # Don't have the deepspeed_config argument if no path is provided or no parameters set
      if deepspeed_config_path == "":
          return command_to_run
      return command_to_run + [
          "--deepspeed_config",
          deepspeed_config_path,
      ]
  
file_path: spark/python/pyspark/ml/deepspeed/deepspeed_distributor.py
imports: import json
  import sys
  import tempfile
  from typing import Union, Callable, List, Dict, Optional, Any
  from pyspark.ml.torch.distributor import TorchDistributor
label_desc: Use image node_id 3 for calling the DeepspeedTorchDistributor obj's underlying member method code with example usage: obj._create_torchrun_command(input_params, train_path) and returns: unknown, command_to_run