def make_declarative_base(self, model, metadata=None):
if not isinstance(model, DeclarativeMeta):<EOL><INDENT>model = declarative_base(<EOL>cls=model,<EOL>name='<STR_LIT>',<EOL>metadata=metadata,<EOL>metaclass=DefaultMeta<EOL>)<EOL><DEDENT>if metadata is not None and model.metadata is not metadata:<EOL><INDENT>model.metadata = metadata<EOL><DEDENT>if not getattr(model, '<STR_LIT>', None):<EOL><INDENT>model.query_class = self.Query<EOL><DEDENT>model.query = _QueryProperty(self)<EOL>return model<EOL>
Creates the declarative base that all models will inherit from.

        :param model: base model class (or a tuple of base classes) to pass
            to :func:`~sqlalchemy.ext.declarative.declarative_base`. Or a class
            returned from ``declarative_base``, in which case a new base class
            is not created.
        :param metadata: :class:`~sqlalchemy.MetaData` instance to use, or
            none to use SQLAlchemy's default.

        .. versionchanged 2.3.0::
            ``model`` can be an existing declarative base in order to support
            complex customization such as changing the metaclass.