@parent.setter
def parent(self, value):
    if (not isinstance(value, Fiber)):
        raise TypeError('parent must be a Fiber')
    if value._ended:
        raise ValueError('parent must not have ended')
    if (self._thread_id != value._thread_id):
        raise ValueError('parent cannot be on a different thread')
    self.__dict__['parent'] = value
@parent.setter
def parent(self, value):
    if (not isinstance(value, Fiber)):
        raise TypeError('parent must be a Fiber')
    if value._ended:
        raise ValueError('parent must not have ended')
    if (self._thread_id != value._thread_id):
        raise ValueError('parent cannot be on a different thread')
    self.__dict__['parent'] = value