Center a region on its start and expand it to window_size bases.

  :return: the new region.

def center_start(r, window_size):
  """
  Center a region on its start and expand it to window_size bases.

  :return: the new region.
  """
  res = copy.copy(r)
  res.end = res.start + window_size / 2
  res.start = res.end - window_size
  return res