def __getstate__(self):
        """
        Used by jsonpikle to remove unwanted fields.
        """
        properties = copy.copy(self.__dict__)
        super(Segment, self)._delete_empty_properties(properties)
        if not self.user:
            del properties['user']
        del properties['ref_counter']
        del properties['_subsegments_counter']
        return properties
def __getstate__ ( self ) : properties = copy . copy ( self . __dict__ ) super ( Segment , self ) . _delete_empty_properties ( properties ) if not self . user : del properties [ 'user' ] del properties [ 'ref_counter' ] del properties [ '_subsegments_counter' ] return properties
Used by jsonpikle to remove unwanted fields.