code: def init_db(drop_all=False):
      
      if drop_all:
          Base.metadata.drop_all(bind=engine)
      Base.metadata.create_all(bind=engine)
  
      return session
docs: Initialize the database, optionally dropping existing tables.