<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_user(self, user):
 """ set user of a segment. One segment can only have one user. User is indexed and can be later queried. """

        super(Segment, self)._check_ended()
        self.user = user