code: def by_vol_id(blocks, slist=None):
      vol_blocks = {}
      for i in blocks:
          if slist and i not in slist:
              continue
          elif not blocks[i].is_valid:
              continue
          if blocks[i].vid_hdr.vol_id not in vol_blocks:
              vol_blocks[blocks[i].vid_hdr.vol_id] = []
          vol_blocks[blocks[i].vid_hdr.vol_id].append(blocks[i].peb_num)
      return vol_blocks