code: def _test_activation_checkpoint_ordering(
      module, expected_ordering, *inputs
  ):
      # Move to device
      module.cuda()
  
      # Get rid of dropouts until we fork the RNG between tests.
      module.eval()
  
      module_ = deepcopy(module)
      inputs_ = _prep_inputs(*inputs)
      test = _compute(module_, *inputs_, do_checkpoint=True)
  
      outputs = test["outputs"]
      test_ordering = []
      for item in outputs:
          if type(item) in [list, tuple]:
              test_ordering += [torch.is_tensor(t) for t in item]
          else:
              test_ordering += [torch.is_tensor(item)]
  
      assert expected_ordering == test_ordering
  
imports: import pytest
  import torch
  import deepspeed
  from copy import deepcopy
  from unit.common import DistributedTest
label_desc: Use image node_id 5 for calling a global function with example usage: _test_activation_checkpoint_ordering(module, expected_ordering) without return types