async def create(self, db: AsyncSession, *, obj_in: UserCreate) -> User:
        """Create a new user.

        Always creates a default organization for the user if one is not provided.
        Also creates a default API key for the user.

        Args:
            db (AsyncSession): The database session.
            obj_in (UserCreate): The object to create.

        Returns:
            User: The newly created user.
        """
        # Always create an organization for the user if one is not provided
        if not hasattr(obj_in, "organization_id") or obj_in.organization_id is None:
            from airweave.crud.crud_organization import organization as crud_organization
            from airweave.schemas.organization import OrganizationCreate

            org_name = f"Organization for {obj_in.email}"

            # Check if an organization with this name already exists
            existing_org = await crud_organization.get_by_name(db, name=org_name)
            if existing_org:
                # Use the existing organization
                org_id = existing_org.id
            else:
                # Create a new organization
                org_in = OrganizationCreate(
                    name=org_name, description=f"Auto-created organization for {obj_in.email}"
                )
                org = await crud_organization.create(db, obj_in=org_in)
                org_id = org.id

            # Update the user create object with the organization
            user_data = obj_in.model_dump()
            user_data["organization_id"] = org_id
            obj_in = UserCreate(**user_data)

        # Create the user using the parent class method
        user = await super().create(db, obj_in=obj_in)
        user_id = user.id

        # Explicitly load the organization in a new query
        stmt = select(User).where(User.id == user_id).options(selectinload(User.organization))
        result = await db.execute(stmt)

        return result.scalar_one_or_none()
Create a new user.

        Always creates a default organization for the user if one is not provided.
        Also creates a default API key for the user.

        Args:
            db (AsyncSession): The database session.
            obj_in (UserCreate): The object to create.

        Returns:
            User: The newly created user.
        
backend/airweave/crud/crud_user.py