* chore(deps): upgrade psycopg packages to version 3.3.0 * chore: update Python version to 3.12.x in CI workflow * refactor: clean up imports and improve code formatting across multiple files