async def register_login_ingest_user(self, user_email: str, password: str):
        """Register and login a single user with robust error handling."""
        # Register user
        reg_result = await self.safe_call(
            self.client.users.create(user_email, password),
            timeout=REGISTER_TIMEOUT,
            operation_desc=f"register user {user_email}",
        )
        if reg_result is None:
            print(
                f"Registration may have failed or user {user_email} already exists."
            )

        # Login user
        login_result = await self.safe_call(
            self.client.users.login(user_email, password),
            timeout=LOGIN_TIMEOUT,
            operation_desc=f"login user {user_email}",
        )
        user = ({
            "email": user_email,
            "password": password
        } if login_result else None)

        # Ingest documents for user
        files = glob("core/examples/data/*")
        for file in files:
            with open(file, "r"):
                try:
                    pass
                    # await self.client.documents.create(file_path=file)
                    # await self.safe_call(
                    #     self.client.documents.create(file_path=file, run_with_orchestration=False),
                    #     timeout=DOC_UPLOAD_TIMEOUT,
                    #     operation_desc=f"document ingestion {file} for {user_email}"
                    # )
                except:
                    pass

        return user
Register and login a single user with robust error handling.
py/tests/scaling/loadTester.py