code: def add_device_args(params):
      device_params = params.add_argument_group("Device parameters")
  
      device_params.add_argument(
          "--device-id",
          type=int_greater_or_equal(0),
          default=0,
          help='GPU to use. 0 translates to "cuda:0", etc. When running in distributed mode '
          "(--dist), each process's device is set automatically. Default: %(default)s.",
      )
      device_params.add_argument(
          "--use-cpu",
          action="store_true",
          help="Use CPU device instead of GPU.",
      )
      device_params.add_argument(
          "--env",
          help="List of environment variables to be set before importing PyTorch. Separated by "
          '",", e.g. --env=OMP_NUM_THREADS=1,PYTORCH_JIT=0 etc.',
      )
      device_params.add_argument(
          "--tf32",
          type=bool_str(),
          default=True,
          help="Globally enable transparent tf32 acceleration of float32 at the cost of reducing "
          "precision to 10 bits. Default: %(default)s.",
      )
  
imports: import argparse
  import os
  import sys
  import types
  from typing import Any, Callable, Dict, List, Tuple, Optional
  import yaml
  from sockeye.utils import smart_open
  from .None import constants
label_desc: Use image node_id 26 for calling a global function with example usage: add_device_args(params) without return types