code: def center_middle(r, window_size):
    
    res = copy.copy(r)
    mid = res.start + (len(res) / 2)
    res.start = mid - (window_size / 2)
    res.end = res.start + window_size
    return res
docs: Center a region on its middle and expand it to window_size bases.
  
    :return: the new region.