code: def print_statistics(pianorolls):
      """Prints statistics of given pianorolls, such as max and unique length."""
      if isinstance(pianorolls, np.ndarray):
          tf.logging.info(pianorolls.shape)
      tf.logging.info("# of total pieces in set: %d", len(pianorolls))
      lengths = [len(roll) for roll in pianorolls]
      if len(np.unique(lengths)) > 1:
          tf.logging.info("lengths %s", np.sort(lengths))
      tf.logging.info("max_len %d", max(lengths))
      tf.logging.info(
          "unique lengths %s",
          np.unique(
              sorted(pianoroll.shape[0] for pianoroll in pianorolls)
          ),
      )
      tf.logging.info("shape %s", pianorolls[0].shape)
  
file_path: magenta/magenta/models/coconet/coconet_evaluate.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from magenta.models.coconet import lib_data
  from magenta.models.coconet import lib_evaluation
  from magenta.models.coconet import lib_graph
  from magenta.models.coconet import lib_util
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 6 for calling a global function with example usage: print_statistics(pianorolls) without return types