code: func (c *Cluster) GetPrevRegionByKey(key []byte) (*metapb.Region, *metapb.Peer) {
  	c.RLock()
  	defer c.RUnlock()
  
  	currentRegion, _ := c.GetRegionByKey(key)
  	if len(currentRegion.StartKey) == 0 {
  		return nil, nil
  	}
  	for _, r := range c.regions {
  		if bytes.Equal(r.Meta.EndKey, currentRegion.StartKey) {
  			return proto.Clone(r.Meta).(*metapb.Region), proto.Clone(r.leaderPeer()).(*metapb.Peer)
  		}
  	}
  	return nil, nil
  }
docs: // GetPrevRegionByKey returns the previous Region and its leader whose range contains the key.