<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def transform_center(self, size):
 """ Tranform self so it is centered on the same spot, but has new size. If the region grows, the extra nucleotides will be distributed evenly to the 5' and 3' side of the current region if possible. If the extra is odd, the 3' side will get the extra one. Similarly, if the resize shrinks the interval, bases will be removed from the 5' and 3' sides equally; if the number to remove is odd, the extra one will be removed from the 3' side. :param size: size of the region after transformation. """

    if size < 1:
      raise GenomicIntervalError("Cannot resize genomic interval to " +
                                 str(size) + " bases; must be at least 1 " +
                                 "base in length")
    if size == len(self):
      return
    elif size > len(self):
      extra = size - len(self)
      extra_5_prime = extra / 2
      extra_3_prime = extra / 2 if extra % 2 == 0 else (extra / 2) + 1
      assert(extra_5_prime + extra_3_prime == extra)
      self.start = (self.start - extra_5_prime if self.isPositiveStrand()
                    else self.start - extra_3_prime)
      self.end = (self.end + extra_3_prime if self.isPositiveStrand()
                  else self.end + extra_5_prime)
    else:
      less = len(self) - size
      less_5_prime = less / 2
      less_3_prime = less / 2 if less % 2 == 0 else (less / 2) + 1
      assert(less_5_prime + less_3_prime == less)
      self.start = (self.start + less_5_prime if self.isPositiveStrand()
                    else self.start + less_3_prime)
      self.end = (self.end - less_3_prime if self.isPositiveStrand()
                  else self.end - less_5_prime)