code: def setTopRight(self, loc):
          
          offset = self.getTopRight().getOffset(loc) # Calculate offset from current top right
          return self.setLocation(self.getTopLeft().offset(offset)) # Move top left corner by the same offset
docs: Move this region so its top right corner is on ``loc``