code: def add_distributed_training_args(parser, default_world_size=None):
      group = parser.add_argument_group("distributed_training")
      if default_world_size is None:
          default_world_size = max(1, torch.cuda.device_count())
      gen_parser_from_dataclass(
          group,
          DistributedTrainingConfig(
              distributed_world_size=default_world_size
          ),
      )
      return group
  
imports: import argparse
  from pathlib import Path
  from typing import Callable, List, Optional, Union
  import torch
  from fairseq import utils
  from fairseq.data.indexed_dataset import get_available_dataset_impl
  from fairseq.dataclass.configs import CheckpointConfig, CommonConfig, CommonEvalConfig, DatasetConfig, DistributedTrainingConfig, EvalLMConfig, GenerationConfig, InteractiveConfig, OptimizationConfig, EMAConfig
  from fairseq.dataclass.utils import gen_parser_from_dataclass
  from fairseq.utils import csv_str_list, eval_bool, eval_str_dict, eval_str_list
label_desc: Use image node_id 12 for calling a global function with example usage: add_distributed_training_args(parser, default_world_size) and returns: group