code: def _threshold_dataset_fn():
      # First four batches of labels, predictions: {TP, FP, TN, FN}
      # with a threshold of 0.5:
      #   True, 1.0 -> TP;  False, .75 -> FP;   True, .25 -> FN
      #  False, 0.0 -> TN;   True, 1.0 -> TP;  False, .75 -> FP
      #   True, .25 -> FN;  False, 0.0 -> TN;   True, 1.0 -> TP
      #  False, .75 -> FP;   True, .25 -> FN;  False, 0.0 -> TN
      return (
          dataset_ops.Dataset.from_tensor_slices(
              {
                  "labels": [True, False, True, False],
                  "predictions": [1.0, 0.75, 0.25, 0.0],
              }
          )
          .repeat()
          .batch(3, 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 3 for calling a global function with example usage: _threshold_dataset_fn() and returns: dataset_ops