<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def hline(self, x, y, width, color):
 """Draw a horizontal line up to a given length."""

        self.rect(x, y, width, 1, color, fill=True)