code: def _get_iterator(data_iter, use_gpu):
      for elem in data_iter:
          if use_gpu:
              elem = recursive_copy_to_gpu(elem, non_blocking=True)
  
          yield elem["input"]
  
file_path: ClassyVision/classy_vision/hooks/precise_batch_norm_hook.py
imports: import logging
  import math
  import torch
  from classy_vision.generic.util import get_batchsize_per_replica, recursive_copy_to_device, recursive_copy_to_gpu
  from classy_vision.hooks import ClassyHook, register_hook
  from fvcore.nn.precise_bn import update_bn_stats
label_desc: Use image node_id 1 for calling a global function with example usage: _get_iterator(data_iter, use_gpu) without return types