code: def _test_estimators_single_device(model, device="cpu", device_id=0):
      def dataset_fn():
          with tf.device("/{0}:{1}".format(device, device_id)):
              return get_dataset(device, device_id)
  
      model.train(input_fn=dataset_fn, steps=EPOCHS * ITERATIONS)
  
      evaluation = model.evaluate(input_fn=dataset_fn, steps=ITERATIONS)
      final_accuracy = (
          evaluation["acc"]
          if "acc" in evaluation
          else evaluation["accuracy"]
      )
      print("Final accuracy: ", final_accuracy)
  
      assert final_accuracy > TARGET
  
imports: import nvidia.dali.plugin.tf
  import os
  from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.fn
  import nvidia.dali.types
  from test_utils_tensorflow import num_available_gpus
  from shutil import rmtree
  import tensorflow
  import tensorflow.compat.v1
label_desc: Use image node_id 10 for calling a global function with example usage: _test_estimators_single_device(model, device, device_id) and returns: get_dataset