code: def reflect_table(engine, klass):
      
  
      try:
          meta = MetaData()
          meta.reflect(bind=engine)
      except OperationalError as e:
          raise DatabaseError(error=e.orig.args[1], code=e.orig.args[0])
  
      # Try to reflect from any of the supported tables
      table = None
  
      for tb in klass.tables():
          if tb in meta.tables:
              table = meta.tables[tb]
              break
  
      if table is None:
          raise DatabaseError(error="Invalid schema. Table not found",
                              code="-1")
  
      # Map table schema into klass
      mapper(klass, table,
             column_prefix=klass.column_prefix())
  
      return table
docs: Inspect and reflect objects