code: def submitit_launcher(cfg) -> None:
      print(
          "###################### Train App Config ####################"
      )
      print(OmegaConf.to_yaml(cfg))
      print(
          "############################################################"
      )
  
      submitit_conf = cfg.get("submitit_conf", None)
      logger_conf = cfg.get("logger", None)
      assert submitit_conf is not None, "Missing submitit config"
  
      if logger_conf is not None:
          assert (
              logger_conf.save_dir is not None
          ), "set save_dir in logger conf to a valid path"
          submitit_dir = os.path.join(
              logger_conf.save_dir, logger_conf.name
          )
      else:
          assert submitit_conf.log_save_dir is not None
          submitit_dir = submitit_conf.log_save_dir
  
      submitit_dir = os.path.join(submitit_dir, "submitit_logs")
      executor = submitit.AutoExecutor(folder=submitit_dir)
      job_kwargs = {
          "slurm_time": submitit_conf.time,
          "name": cfg.logger.name
          if logger_conf is not None
          else submitit_conf.name,
          "slurm_partition": submitit_conf.partition,
          "gpus_per_node": cfg.trainer.gpus,
          "tasks_per_node": cfg.trainer.gpus,  # one task per GPU
          "cpus_per_task": submitit_conf.cpus_per_task,
          "nodes": cfg.trainer.num_nodes,
      }
      if submitit_conf.get("mem", None) is not None:
          job_kwargs["slurm_mem"] = submitit_conf.mem
      if submitit_conf.get("constraints", None) is not None:
          job_kwargs["constraints"] = submitit_conf.constraints
  
      executor.update_parameters(**job_kwargs)
      job = executor.submit(
          run_app_in_certain_mode, cfg, submitit_conf.mode
      )
      print("Submitit Job ID:", job.job_id)
  
imports: import os
  from dataclasses import dataclass, field
  from typing import Any, Dict, List, Optional, Union
  import hydra
  import numpy
  import submitit
  import torch
  from hydra.core.config_store import ConfigStore
  from omegaconf import MISSING, OmegaConf
  from omegaconf.dictconfig import DictConfig
  from pytorch_lightning import LightningDataModule, LightningModule
  from pytorch_lightning.callbacks import Callback, LearningRateMonitor
  from pytorch_lightning.loggers import TensorBoardLogger
  from pytorch_lightning.utilities import rank_zero_info, rank_zero_only
  from pytorchvideo_trainer.datamodule.datamodule import VideoClassificationDataModuleConf
  from pytorchvideo_trainer.module.video_classification import VideoClassificationModuleConf
  from torchrecipes.core.base_train_app import BaseTrainApp, TrainOutput
  from torchrecipes.core.conf import TrainAppConf, TrainerConf
  from torchrecipes.utils.config_utils import get_class_name_str
label_desc: Use image node_id 2 for calling a global function with example usage: submitit_launcher(cfg) without return types