(self)
return relationship(self.Label)
Generates the label tables and adds the attribute to the parent model
        object.

        Returns:
            A relationship to an label (timesketch.models.annotation.Label)
Generates the label tables and adds the attribute to the parent model
        object.
Generates the label tables and adds the attribute to the parent model object .
def labels(self):
        """
        Generates the label tables and adds the attribute to the parent model
        object.

        Returns:
            A relationship to an label (timesketch.models.annotation.Label)
        """
        if six.PY2:
            class_name = b'{0:s}Label'.format(self.__name__)
        else:
            class_name = '{0:s}Label'.format(self.__name__)

        self.Label = type(class_name, (
            Label,
            BaseModel,),
                          dict(
                              __tablename__='{0:s}_label'.format(
                                  self.__tablename__),
                              parent_id=Column(
                                  Integer,
                                  ForeignKey('{0:s}.id'.format(
                                      self.__tablename__))),
                              parent=relationship(self)))
        return relationship(self.Label)
def labels ( self ) : if six . PY2 : class_name = b'{0:s}Label' . format ( self . __name__ ) else : class_name = '{0:s}Label' . format ( self . __name__ ) self . Label = type ( class_name , ( Label , BaseModel , ) , dict ( __tablename__ = '{0:s}_label' . format ( self . __tablename__ ) , parent_id = Column ( Integer , ForeignKey ( '{0:s}.id' . format ( self . __tablename__ ) ) ) , parent = relationship ( self ) ) ) return relationship ( self . Label )