<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def width_at_offset(self, n):
 """Returns the horizontal position of character n of the string"""

        #TODO make more efficient?
        width = wcswidth(self.s[:n])
        assert width != -1
        return width