code: def _add_core_arguments(parser):
      r"""Helper (internal) function to update an argument parser with an argument group of the core DeepSpeed arguments.
          The core set of DeepSpeed arguments include the following:
          1) --deepspeed: boolean flag to enable DeepSpeed
          2) --deepspeed_config <json file path>: path of a json configuration file to configure DeepSpeed runtime.
  
          This is a helper function to the public add_config_arguments()
  
      Arguments:
          parser: argument parser
      Return:
          parser: Updated Parser
      """
      group = parser.add_argument_group(
          "DeepSpeed", "DeepSpeed configurations"
      )
  
      group.add_argument(
          "--deepspeed",
          default=False,
          action="store_true",
          help="Enable DeepSpeed (helper flag for user code, no impact on DeepSpeed backend)",
      )
  
      group.add_argument(
          "--deepspeed_config",
          default=None,
          type=str,
          help="DeepSpeed json configuration file.",
      )
  
      group.add_argument(
          "--deepscale",
          default=False,
          action="store_true",
          help="Deprecated enable DeepSpeed (helper flag for user code, no impact on DeepSpeed backend)",
      )
  
      group.add_argument(
          "--deepscale_config",
          default=None,
          type=str,
          help="Deprecated DeepSpeed json configuration file.",
      )
  
      group.add_argument(
          "--deepspeed_mpi",
          default=False,
          action="store_true",
          help="Run via MPI, this will attempt to discover the necessary variables to initialize torch "
          "distributed from the MPI environment",
      )
  
      return parser
  
imports: import sys
  import types
  import json
  from typing import Optional, Union
  import torch
  from torch.optim import Optimizer
  from torch.optim.lr_scheduler import _LRScheduler
  from packaging import version
  from .None import ops
  from .None import module_inject
  from .accelerator import get_accelerator
  from .runtime.engine import DeepSpeedEngine, DeepSpeedOptimizerCallable, DeepSpeedSchedulerCallable
  from .runtime.engine import ADAM_OPTIMIZER, LAMB_OPTIMIZER
  from .runtime.hybrid_engine import DeepSpeedHybridEngine
  from .runtime.pipe.engine import PipelineEngine
  from .inference.engine import InferenceEngine
  from .inference.config import DeepSpeedInferenceConfig
  from .runtime.lr_schedules import add_tuning_arguments
  from .runtime.config import DeepSpeedConfig, DeepSpeedConfigError
  from .runtime.activation_checkpointing import checkpointing
  from .ops.transformer import DeepSpeedTransformerLayer, DeepSpeedTransformerConfig
  from .module_inject import replace_transformer_layer, revert_transformer_layer
  from .utils import log_dist, OnDevice, logger
  from .comm.comm import init_distributed
  from .runtime import zero
  from .runtime import DeepSpeedOptimizer, ZeROOptimizer
  from .pipe import PipelineModule
  from .git_version_info import version, git_hash, git_branch
label_desc: Use image node_id 3 for calling a global function with example usage: _add_core_arguments(parser) and returns: parser