code: def dataset_input_fn(features=8.0, labels=9.0, return_dataset=False):
      """Returns feature and label `Tensors` via a `Dataset`."""
  
      labels = labels or 0.0
  
      def _input_fn(params=None):
          """The `Dataset` input_fn which will be returned."""
  
          del params  # Unused.
  
          def _map(f, l):
              return {"x": f}, l
  
          input_features = tf.data.Dataset.from_tensors([features])
          input_labels = tf.data.Dataset.from_tensors([labels])
          dataset = tf.data.Dataset.zip(
              (input_features, input_labels)
          ).map(_map)
          if return_dataset:
              return dataset
          return tf.compat.v1.data.make_one_shot_iterator(
              dataset
          ).get_next()
  
      return _input_fn
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import shutil
  import struct
  import sys
  from absl import flags
  from absl.testing import parameterized
  from adanet import ensemble
  from adanet import subnetwork
  from adanet import tf_compat
  from adanet.core.architecture import _Architecture
  from adanet.core.candidate import _Candidate
  from adanet.core.ensemble_builder import _EnsembleSpec
  from adanet.core.ensemble_builder import _SubnetworkSpec
  from adanet.core.eval_metrics import _EnsembleMetrics
  from adanet.core.eval_metrics import _IterationMetrics
  from adanet.core.eval_metrics import _SubnetworkMetrics
  import tensorflow.compat.v2
label_desc: Use image node_id 6 for calling a global function with example usage: dataset_input_fn(features, labels, return_dataset) and returns: _input_fn, tf, dict,  l, dataset