code: func SplitRegionRanges(bo *Backoffer, cache *RegionCache, keyRanges []kv.KeyRange) ([]kv.KeyRange, error) {
  	ranges := copRanges{mid: keyRanges}
  
  	var ret []kv.KeyRange
  	appendRange := func(region RegionVerID, ranges *copRanges) {
  		for i := 0; i < ranges.len(); i++ {
  			ret = append(ret, ranges.at(i))
  		}
  	}
  
  	err := splitRanges(bo, cache, &ranges, appendRange)
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  	return ret, nil
  }
docs: // SplitRegionRanges get the split ranges from pd region.