code: def CreateLossScaler(
      dtype, static_loss_scale, dynamic_scaling, dynamic_loss_args
  ):
      if dtype == torch.half and dynamic_scaling:
          if dynamic_loss_args is None:
              return DynamicLossScaler(dtype=dtype)
          return DynamicLossScaler(dtype=dtype, **dynamic_loss_args)
  
      loss_scale_value = (
          static_loss_scale if dtype == torch.half else 1.0
      )
      return LossScaler(scale=loss_scale_value)
  
imports: import torch
  from deepspeed import comm
  from deepspeed.utils import logger
label_desc: Use image node_id 2 for calling a global function with example usage: CreateLossScaler(dtype, static_loss_scale, dynamic_scaling, dynamic_loss_args) and returns: LossScaler, DynamicLossScaler, DynamicLossScaler