'Creates the declarative base.'

def make_declarative_base(self, model, metadata=None):

    base = declarative_base(cls=model, name='Model', metadata=metadata, metaclass=_BoundDeclarativeMeta)
    if (not getattr(base, 'query_class', None)):
        base.query_class = self.Query
    base.query = _QueryProperty(self)
    return base
