code: def create_hero(
      *, session: Session = Depends(get_session), hero: HeroCreate
  ):
      db_hero = Hero.model_validate(hero)
      session.add(db_hero)
      session.commit()
      session.refresh(db_hero)
      return db_hero
  
imports: from typing import List, Optional
  from fastapi import Depends, FastAPI, HTTPException, Query
  from sqlmodel import Field, Relationship, Session, SQLModel, create_engine, select
label_desc: Use image node_id 4 for calling a global function with example usage: create_hero() and returns: db_hero