<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_subsegment(self, subsegment):
 """ Add input subsegment as a child subsegment. """

        self._check_ended()
        subsegment.parent_id = self.id
        self.subsegments.append(subsegment)