code: def find_model_by_table_name(name):
      
  
      for model in ModelBase._decl_class_registry.values():
          if hasattr(model, '__table__') and model.__table__.fullname == name:
              return model
      return None
docs: Find a model reference by its table name