code: def midiae_f0_summary(f0_hz, outputs, step):
      """Makes plots to inspect f0/pitch components of MidiAE.
  
      Args:
        f0_hz: The input f0 to the network.
        outputs: Output dictionary from the MidiAe net.
        step: The step that the optimizer is currently on.
      """
      batch_size = int(f0_hz.shape[0])
      for i in range(batch_size):
          f0_midi = ddsp.core.hz_to_midi(tf.squeeze(f0_hz[i]))
          q_pitch = np.squeeze(outputs["q_pitch"][i])
          f0_rec = np.squeeze(outputs["f0_midi_pred"][i])
          _midiae_f0_helper(
              q_pitch,
              f0_midi,
              f0_rec,
              i,
              step,
              "rec_f0",
              "midiae_decoder_pitch",
          )
  
          if "f0_midi_rec2" in outputs:
              f0_rec2 = np.squeeze(outputs["f0_midi_pred2"][i])
              _midiae_f0_helper(
                  q_pitch,
                  f0_midi,
                  f0_rec2,
                  i,
                  step,
                  "rec_f0_2",
                  "midiae_decoder_pitch2",
              )
  
          if "pitch" in outputs:
              raw_pitch = np.squeeze(outputs["pitch"][i])
              _midiae_f0_helper(
                  q_pitch,
                  f0_midi,
                  raw_pitch,
                  i,
                  step,
                  "z_pitch",
                  "midiae_encoder_pitch",
              )
  
imports: import io
  import ddsp
  from ddsp.core import tf_float32
  from ddsp.training.plotting import pianoroll_plot_setup
  import matplotlib.patches
  import matplotlib.pyplot
  from matplotlib.ticker import MaxNLocator
  import note_seq
  from note_seq import sequences_lib
  import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 11 for calling a global function with example usage: midiae_f0_summary(f0_hz, outputs, step) without return types