code: def rotate(self):
          
          self.refresh_balance()
          if abs(self.balance) < 2:
              return self
          # balance > 0  is the heavy side
          my_heavy = self.balance > 0
          child_heavy = self[my_heavy].balance > 0
          if my_heavy == child_heavy or self[my_heavy].balance == 0:
              ## Heavy sides same
              #    self     save
              #  save   -> 1   self
              # 1
              #
              ## Heavy side balanced
              #    self     save         save
              #  save   -> 1   self  -> 1  self.rot()
              #  1  2         2
              return self.srotate()
          else:
              return self.drotate()
docs: Does rotating, if necessary, to balance this node, and
          returns the new top node.