<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def center_middle(r, window_size):
 """ Center a region on its middle and expand it to window_size bases. :return: the new region. """

  res = copy.copy(r)
  mid = res.start + (len(res) / 2)
  res.start = mid - (window_size / 2)
  res.end = res.start + window_size
  return res