class_docstr: DeclarativeBase mixin that sets a model's ``__tablename__`` by converting the
  ``CamelCase`` class name to ``snake_case``. A name is set for non-abstract models
  that do not otherwise define ``__tablename__``. If a model does not define a primary
  key, it will not generate a name or ``__table__``, for single-table inheritance.
  
  .. versionchanged:: 3.1.0
class_docstr_tok: ["DeclarativeBase","mixin","that","sets","a","model","'s","``","__tablename__","``","by","converting","the","``","CamelCase","``","class","name","to","``","snake_case","``",".","A","name","is","set","for","non-abstract","models","that","do","not","otherwise","define","``","__tablename__","``",".","If","a","model","does","not","define","a","primary","key",",","it","will","not","generate","a","name","or","``","__table__","``",",","for","single-table","inheritance",".","..","versionchanged",":",":","3.1.0"]
code: def __init_subclass__(
      cls: t.Type[NameMixin], **kwargs: t.Dict[str, t.Any]
  ) -> None:
      if should_set_tablename(cls):
          cls.__tablename__ = camel_to_snake_case(cls.__name__)
  
      super().__init_subclass__(**kwargs)
  
      # __table_cls__ has run. If no table was created, use the parent table.
      if (
          "__tablename__" not in cls.__dict__
          and "__table__" in cls.__dict__
          and cls.__dict__["__table__"] is None
      ):
          del cls.__table__
  
imports: from __future__ import annotations
  import re
  import typing
  import sqlalchemy
  import sqlalchemy.orm
  from .query import Query
label_desc: Use image node_id 1 for calling the NameMixin obj's underlying member method code with example usage: obj.__init_subclass__(cls) without return types