code: def load(self, filename):
          
          def reconstruct_sparse(target_dict, name):
              """Return a reconstructed instance of `scipy.sparse.csc_matrix`."""
              return csc_matrix((target_dict[name+'_csc_data'],
                                 target_dict[name+'_csc_indices'],
                                 target_dict[name+'_csc_indptr']),
                                shape=target_dict[name+'_csc_shape']).toarray()
  
          with np.load(filename) as loaded:
              if 'info.json' not in loaded:
                  raise ValueError("Cannot find 'info.json' in the npz file.")
              info_dict = json.loads(loaded['info.json'].decode('utf-8'))
              self.name = info_dict['name']
              self.beat_resolution = info_dict['beat_resolution']
  
              self.tempo = loaded['tempo']
              if 'downbeat' in loaded.files:
                  self.downbeat = loaded['downbeat']
              else:
                  self.downbeat = None
  
              idx = 0
              self.tracks = []
              while str(idx) in info_dict:
                  pianoroll = reconstruct_sparse(
                      loaded, 'pianoroll_{}'.format(idx))
                  track = Track(pianoroll, info_dict[str(idx)]['program'],
                                info_dict[str(idx)]['is_drum'],
                                info_dict[str(idx)]['name'])
                  self.tracks.append(track)
                  idx += 1
  
          self.check_validity()
docs: Load a npz file. Supports only files previously saved by
          :meth:`pypianoroll.Multitrack.save`.
  
          Notes
          -----
          Attribute values will all be overwritten.
  
          Parameters
          ----------
          filename : str
              The name of the npz file to be loaded.