code: def segment_notes_batch(
      binarize_f,
      pick_f0_f,
      pick_amps_f,
      controls_batch,
      frame_rate=DDSP_DEFAULT_FRAME_RATE,
  ):
      """A function to split a controls dict into discrete notes.
  
      Args:
        binarize_f: Returns a binary vector that is True when a note is on.
        pick_f0_f: Returns a single f0 for a vector of f0s of a single note.
        pick_amps_f: Returns a single amplitude for a vector of amplidutes of a
          single note.
        controls_batch: The controls as returned from model inference, packed into a
          batch.
        frame_rate: Frame rate for the notes found.
  
      Returns:
        A list of NoteSequence objects, one for each element in the input batch.
  
      """
      notes_batch = []
      for controls in _unbatch(controls_batch):
          notes_batch.append(
              segment_notes(
                  binarize_f=binarize_f,
                  pick_f0_f=pick_f0_f,
                  pick_amps_f=pick_amps_f,
                  controls=controls,
                  frame_rate=frame_rate,
              )
          )
      return notes_batch
  
file_path: ddsp/ddsp/training/heuristics.py
imports: import ddsp
  import gin
  import note_seq
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 3 for calling a global function with example usage: segment_notes_batch(binarize_f, pick_f0_f, pick_amps_f, controls_batch, frame_rate) and returns: notes_batch