docs: def get_bind(self, mapper=None, clause=None):
          """Return the engine or connection for a given model or
          table, using the ``__bind_key__`` if it is set.
          """
          # mapper is None if someone tries to just get a connection
          if mapper is not None:
              try:
                  # SA >= 1.3
                  persist_selectable = mapper.persist_selectable
              except AttributeError:
                  # SA < 1.3
                  persist_selectable = mapper.mapped_table
  
              info = getattr(persist_selectable, 'info', {})
              bind_key = info.get('bind_key')
              if bind_key is not None:
                  state = get_state(self.app)
                  return state.db.get_engine(self.app, bind=bind_key)
          return SessionBase.get_bind(self, mapper, clause)