class_docstr: Class for retrieving different datasets.
class_docstr_tok: ["Class","for","retrieving","different","datasets","."]
docstr: Turn sequences into pianorolls.
  
  Args:
    sequences: the collection of sequences to convert. If not given, the
        entire dataset is converted.
  
  Returns:
    A list of multi-instrument pianorolls, each shaped
        (duration, pitches, instruments)
docstr_tok: ["Turn","sequences","into","pianorolls",".","Args",":","sequences",":","the","collection","of","sequences","to","convert",".","If","not","given",",","the","entire","dataset","is","converted",".","Returns",":","A","list","of","multi-instrument","pianorolls",",","each","shaped","(","duration",",","pitches",",","instruments",")"]
code: def get_pianorolls(self, sequences=None):
      """Turn sequences into pianorolls.
  
      Args:
        sequences: the collection of sequences to convert. If not given, the
            entire dataset is converted.
  
      Returns:
        A list of multi-instrument pianorolls, each shaped
            (duration, pitches, instruments)
      """
      if sequences is None:
          sequences = self.get_sequences()
      return list(map(self.encoder.encode, sequences))
  
imports: import os
  from magenta.models.coconet import lib_mask
  from magenta.models.coconet import lib_pianoroll
  from magenta.models.coconet import lib_util
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 6 for calling the Dataset obj's underlying member method code with example usage: obj.get_pianorolls(sequences) and returns: list