class_docstr: Gin-configurable wrapper to generate synthetic examples.
class_docstr_tok: ["Gin-configurable","wrapper","to","generate","synthetic","examples","."]
code: def process(self, seed, generate_fn=gin.REQUIRED):
      np.random.seed(seed)
      batch = generate_fn(n_batch=1)
      beam.metrics.Metrics.counter(
          "GenerateExampleFn", "generated"
      ).inc()
      yield {k: v[0].numpy() for k, v in batch.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 3 for calling the GenerateExampleFn obj's underlying member method code with example usage: obj.process(seed, generate_fn) without return types