def METHOD_NAME(Base, Document):
    class METHOD_NAME(Base):
        __tablename__ = 'section'
        id = sa.Column(sa.Integer, primary_key=True)
        name = sa.Column(sa.Unicode(255))
        locale = sa.Column(sa.String(10))
        document_id = sa.Column(
            sa.Integer, sa.ForeignKey(Document.id)
        )
        document = sa.orm.relationship(Document, backref='sections')
    return METHOD_NAME