code: def get_next_sample_dataset(dataset_iter):
      """Get next sample."""
      try:
          sample = next(dataset_iter)
      except (StopIteration, RuntimeError) as e:
          if "Can't copy Tensor with type" in str(e):
              sample = None
          elif isinstance(e, StopIteration):
              sample = None
          else:
              raise e
      return sample
  
file_path: graphics/tensorflow_graphics/projects/points_to_3Dobjects/utils/tf_utils.py
imports: import numpy
  import tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: get_next_sample_dataset(dataset_iter) and returns: sample