class_docstr: Metaclass mixin that sets a model's ``metadata`` based on its ``__bind_key__``.
  
  If the model sets ``metadata`` or ``__table__`` directly, ``__bind_key__`` is
  ignored. If the ``metadata`` is the same as the parent model, it will not be set
  directly on the child model.
class_docstr_tok: ["Metaclass","mixin","that","sets","a","model","'s","``","metadata","``","based","on","its","``","__bind_key__","``",".","If","the","model","sets","``","metadata","``","or","``","__table__","``","directly",",","``","__bind_key__","``","is","ignored",".","If","the","``","metadata","``","is","the","same","as","the","parent","model",",","it","will","not","be","set","directly","on","the","child","model","."]
code: def __init__(
      cls,
      name: str,
      bases: tuple[type, ...],
      d: dict[str, t.Any],
      **kwargs: t.Any,
  ) -> None:
      if not (
          "metadata" in cls.__dict__ or "__table__" in cls.__dict__
      ):
          bind_key = getattr(cls, "__bind_key__", None)
          parent_metadata = getattr(cls, "metadata", None)
          metadata = cls.__fsa__._make_metadata(bind_key)
  
          if metadata is not parent_metadata:
              cls.metadata = metadata
  
      super().__init__(name, bases, d, **kwargs)
  
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 to create a new BindMetaMixin object from inherited base classes: type with example: obj = BindMetaMixin(cls, name, bases, d)