code: def test_external_source_callback():
      for use_fn_api in [False, True]:
          for device in ["cpu", "gpu"]:
              for batch in [True, False]:
                  for as_tensor in [False, True]:
                      yield _test_external_source_callback, use_fn_api, batch, as_tensor, device
  
imports: import functools
  import numpy
  import nvidia.dali.fn
  import nvidia.dali.ops
  from nvidia.dali import Pipeline
  from nose_utils import assert_raises
  from test_utils import check_output
label_desc: Use image node_id 10 for calling a global function with example usage: test_external_source_callback() without return types