code: func (h *Helper) FetchRegionTableIndex(metrics map[uint64]RegionMetric, allSchemas []*model.DBInfo) (map[TblIndex]RegionMetric, error) {
  	idxMetrics := make(map[TblIndex]RegionMetric)
  	for regionID, regionMetric := range metrics {
  		region, err := h.RegionCache.LocateRegionByID(tikv.NewBackoffer(context.Background(), 500), regionID)
  		if err != nil {
  			logutil.Logger(context.Background()).Error("locate region failed", zap.Error(err))
  			continue
  		}
  
  		hotRange, err := NewRegionFrameRange(region)
  		if err != nil {
  			return nil, err
  		}
  
  		f := h.FindTableIndexOfRegion(allSchemas, hotRange)
  		if f != nil {
  			idx := TblIndex{
  				DbName:    f.DBName,
  				TableName: f.TableName,
  				TableID:   f.TableID,
  				IndexName: f.IndexName,
  				IndexID:   f.IndexID,
  			}
  			metric, exists := idxMetrics[idx]
  			if !exists {
  				metric = regionMetric
  				metric.Count++
  				idxMetrics[idx] = metric
  			} else {
  				metric.FlowBytes += regionMetric.FlowBytes
  				if metric.MaxHotDegree < regionMetric.MaxHotDegree {
  					metric.MaxHotDegree = regionMetric.MaxHotDegree
  				}
  				metric.Count++
  			}
  		}
  	}
  
  	return idxMetrics, nil
  }
docs: // FetchRegionTableIndex constructs a map that maps a table to its hot region information by the given raw hot region metrics.