code: def _build_fp16_env(dummy=False):
      if dummy:
          return ExitStack, DummyGradScaler
      else:
          if not paddle.device.is_compiled_with_cuda():
              raise RuntimeError("No cuda")
          if paddle.device.cuda.get_device_capability(0)[0] < 7:
              logger.warning(
                  "NOTE: your device does NOT support faster training with fp16, "
                  "please switch to FP32 which is likely to be faster"
              )
          return auto_cast, GradScaler
  
imports: import socket
  import os
  import struct
  import random
  import inspect
  import numpy
  from copy import deepcopy
  from contextlib import ExitStack, closing
  from typing import Dict, Optional
  from fastNLP.envs.imports import _NEED_IMPORT_PADDLE
  from fastNLP.envs.utils import get_global_seed
  from fastNLP.envs import get_global_rank, FASTNLP_BACKEND_LAUNCH, FASTNLP_GLOBAL_SEED
  from fastNLP.core.samplers import ReproducibleBatchSampler
  from fastNLP.core.utils import auto_param_call, paddle_to
  from fastNLP.core.log import logger
label_desc: Use image node_id 2 for calling a global function with example usage: _build_fp16_env(dummy) and returns: ExitStack,  DummyGradScaler, auto_cast,  GradScaler