code: def create_hero(hero: HeroCreate):
      with Session(engine) as session:
          db_hero = Hero.model_validate(hero)
          session.add(db_hero)
          session.commit()
          session.refresh(db_hero)
          return db_hero
  
file_path: sqlmodel/docs_src/tutorial/fastapi/limit_and_offset/tutorial001_py310.py
imports: from fastapi import FastAPI, HTTPException, Query
  from sqlmodel import Field, Session, SQLModel, create_engine, select
label_desc: Use image node_id 3 for calling a global function with example usage: create_hero(hero) and returns: db_hero