code: def _labeled_dataset_fn():
      # First four batches of x: labels, predictions -> (labels == predictions)
      #  0: 0, 0 -> True;   1: 1, 1 -> True;   2: 2, 2 -> True;   3: 3, 0 -> False
      #  4: 4, 1 -> False;  5: 0, 2 -> False;  6: 1, 0 -> False;  7: 2, 1 -> False
      #  8: 3, 2 -> False;  9: 4, 0 -> False; 10: 0, 1 -> False; 11: 1, 2 -> False
      # 12: 2, 0 -> False; 13: 3, 1 -> False; 14: 4, 2 -> False; 15: 0, 0 -> True
      return (
          dataset_ops.Dataset.range(1000)
          .map(lambda x: {"labels": x % 5, "predictions": x % 3})
          .batch(4, drop_remainder=True)
      )
  
imports: from absl.testing import parameterized
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.distribute import combinations
  from tensorflow.python.distribute import strategy_combinations
  from tensorflow.python.distribute import strategy_test_lib
  from tensorflow.python.eager import test
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import metrics
  from tensorflow.python.ops import variables
label_desc: Use image node_id 1 for calling a global function with example usage: _labeled_dataset_fn() and returns: dataset_ops