code: def all_subs(bounds):
      
      idx_list = []
      for i in range(len(bounds)):
          this_dim = bounds[i]
          lo,hi = this_dim[0],this_dim[1]   # bounds for this dimension
          this_dim_idxs = range(lo,hi+1)    # indexes for this dimension
          idx_list.append(this_dim_idxs)
  
      return idx2subs(idx_list)
docs: given a list of tuples specifying the bounds of an array, all_subs()
         returns a list of all the tuples of subscripts for that array.