<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def do_region(self, x, y, w, h):
 """Record region."""

        if (x is None):
            self.rx = 0
            self.ry = 0
            self.rw = self.width
            self.rh = self.height
        else:
            self.rx = x
            self.ry = y
            self.rw = w
            self.rh = h