code: def get_cpu_activations_for_backward(args, inputs):
      new_args = []
      for i, (arg, inp) in enumerate(zip(args, inputs)):
          if not is_activation_to_checkpoint(arg):
              new_args.append(arg)
              continue
  
          arg.data = torch.empty([], device=arg.device).data
          arg.saved_data = inp.data
          new_args.append(arg)
  
      return new_args
  
imports: import copy
  import torch
  import contextlib
  from deepspeed import comm
  import weakref
  import mmap
  from torch import _C
  from deepspeed.runtime.config import DeepSpeedConfig
  from deepspeed.utils import logger
  from deepspeed.runtime.utils import copy_to_device, move_to_device, see_memory_usage, bwc_tensor_model_parallel_rank
  from deepspeed.utils.timer import SynchronizedWallClockTimer, FORWARD_GLOBAL_TIMER
  from deepspeed.accelerator import get_accelerator
label_desc: Use image node_id 14 for calling a global function with example usage: get_cpu_activations_for_backward(args, inputs) and returns: new_args