code: def index_exists(engine: Engine, tablename: str, indexname: str) -> bool:
      
      insp = Inspector.from_engine(engine)
      return any(i['name'] == indexname for i in insp.get_indexes(tablename))
docs: Does the specified index exist for the specified table?