code: def _float_dict_to_tfexample(float_dict):
      """Convert dictionary of float arrays to tf.train.Example proto."""
      return tf.train.Example(
          features=tf.train.Features(
              feature={
                  k: tf.train.Feature(
                      float_list=tf.train.FloatList(value=v.flatten())
                  )
                  for k, v in float_dict.items()
              }
          )
      )
  
file_path: ddsp/ddsp/training/data_preparation/ddsp_generate_synthetic_dataset.py
imports: from absl import app
  from absl import flags
  import apache_beam
  from ddsp.training.data_preparation import synthetic_data
  import gin
  import numpy
  import pkg_resources
  import tensorflow.compat.v2
label_desc: Use image node_id 1 for calling a global function with example usage: _float_dict_to_tfexample(float_dict) and returns: tf