class_docstr: ExternalSource is a special operator that can provide data to a DALI pipeline
  from Python by several methods.
  
  The simplest and preferred way is to specify a ``source``, which can be a callable or iterable.
  
  .. note::
      :meth:`nvidia.dali.fn.external_source` operator is partially compatible with TensorFlow
      integration via :meth:`nvidia.dali.plugin.tf.experimental.DALIDatasetWithInputs`.
      Please refer to its documentation for details.
  
  .. note::
      To return a batch of copies of the same tensor, use :func:`nvidia.dali.types.Constant`,
      which is more performant.
class_docstr_tok: ["ExternalSource","is","a","special","operator","that","can","provide","data","to","a","DALI","pipeline","from","Python","by","several","methods",".","The","simplest","and","preferred","way","is","to","specify","a","``","source","``",",","which","can","be","a","callable","or","iterable",".","..","note",":",":",":","meth",":","`","nvidia.dali.fn.external_source","`","operator","is","partially","compatible","with","TensorFlow","integration","via",":","meth",":","`","nvidia.dali.plugin.tf.experimental.DALIDatasetWithInputs","`",".","Please","refer","to","its","documentation","for","details",".","..","note",":",":","To","return","a","batch","of","copies","of","the","same","tensor",",","use",":","func",":","`","nvidia.dali.types.Constant","`",",","which","is","more","performant","."]
code: def device(self):
      return self._device
  
imports: from nvidia.dali import backend
  from nvidia.dali import tensors
  from nvidia.dali import types
  from nvidia.dali._multiproc.messages import TaskArgs, SampleRange
  import nvidia.dali.types
  from nvidia.dali._utils.external_source_impl import get_callback_from_source, accepted_arg_count, SourceKind
label_desc: Use image node_id 4 for calling the ExternalSource obj's underlying member method code with example usage: obj.device() and returns: self