Generate a declarative model for storing signatures related to the given
    cls parameter.

    :param class cls: The declarative model to generate a signature class for.
    :return: The signature class, as a declarative derived from Base.

def generate_signature_class(cls):
    """
    Generate a declarative model for storing signatures related to the given
    cls parameter.

    :param class cls: The declarative model to generate a signature class for.
    :return: The signature class, as a declarative derived from Base.
    """
    return type("%sSigs" % cls.__name__, (Base,),
                {'__tablename__': "%s_sigs" % cls.__tablename__,
                 'id': sa.Column(sa.Integer,
                                 sa.Sequence('%s_id_seq' % cls.__tablename__),
                                 primary_key=True,
                                 doc="primary key"),
                 'data': sa.Column(sa.Text(), nullable=False,
                                   doc="The signed data"),
                 '%s_id' % cls.__tablename__: sa.Column(sa.Integer,
                                                        sa.ForeignKey("%s.id" % cls.__tablename__),
                                                        nullable=False)})