code: def by_leb(blocks):
       
      slist_len = len(blocks)
      slist = ['x'] * slist_len
  
      for block in blocks:
          if blocks[block].leb_num >= slist_len:
              add_elements = blocks[block].leb_num - slist_len + 1
              slist += (['x'] * add_elements)
              slist_len = len(slist)
  
          slist[blocks[block].leb_num] = block
  
      return slist
docs: Sort blocks by Logical Erase Block number.
      
      Arguments:
      List:blocks -- List of block objects to sort.
      
      Returns:
      List              -- Indexes of blocks sorted by LEB.